mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Roll mini_chromium, adjust to more files in base/apple
This rolls mini_chromium to the version that has more files in base/apple, and adjusts the code to match. Bug: chromium:1444927 Change-Id: I9642698c8c16151bd0aaca7b46745a59d6e5e6d3 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4791121 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Avi Drissman <avi@chromium.org>
This commit is contained in:
parent
6a9e2e6003
commit
13e3accfe8
2
DEPS
2
DEPS
@ -47,7 +47,7 @@ deps = {
|
||||
'9719c1e1e676814c456b55f5f070eabad6709d31',
|
||||
'crashpad/third_party/mini_chromium/mini_chromium':
|
||||
Var('chromium_git') + '/chromium/mini_chromium@' +
|
||||
'f5370228f40bbb8c453e17f6af6c6742858c45d1',
|
||||
'e35fc73aa87bb27e10306900b15a18b0e9c7ca42',
|
||||
'crashpad/third_party/libfuzzer/src':
|
||||
Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' +
|
||||
'fda403cf93ecb8792cb1d061564d89a6553ca020',
|
||||
|
@ -17,8 +17,8 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include "base/apple/bridging.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/mac/scoped_cftyperef.h"
|
||||
#include "base/apple/foundation_util.h"
|
||||
#include "base/apple/scoped_cftyperef.h"
|
||||
#include "base/mac/scoped_launch_data.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "util/misc/implicit_cast.h"
|
||||
@ -36,7 +36,7 @@ launch_data_t CFPropertyToLaunchData(CFPropertyListRef property_cf) {
|
||||
|
||||
if (type_id_cf == CFDictionaryGetTypeID()) {
|
||||
NSDictionary* dictionary_ns = base::apple::CFToNSPtrCast(
|
||||
base::mac::CFCastStrict<CFDictionaryRef>(property_cf));
|
||||
base::apple::CFCastStrict<CFDictionaryRef>(property_cf));
|
||||
base::mac::ScopedLaunchData dictionary_launch(
|
||||
LaunchDataAlloc(LAUNCH_DATA_DICTIONARY));
|
||||
|
||||
@ -60,7 +60,7 @@ launch_data_t CFPropertyToLaunchData(CFPropertyListRef property_cf) {
|
||||
|
||||
} else if (type_id_cf == CFArrayGetTypeID()) {
|
||||
NSArray* array_ns = base::apple::CFToNSPtrCast(
|
||||
base::mac::CFCastStrict<CFArrayRef>(property_cf));
|
||||
base::apple::CFCastStrict<CFArrayRef>(property_cf));
|
||||
base::mac::ScopedLaunchData array_launch(
|
||||
LaunchDataAlloc(LAUNCH_DATA_ARRAY));
|
||||
size_t index = 0;
|
||||
@ -78,7 +78,8 @@ launch_data_t CFPropertyToLaunchData(CFPropertyListRef property_cf) {
|
||||
data_launch = array_launch.release();
|
||||
|
||||
} else if (type_id_cf == CFNumberGetTypeID()) {
|
||||
CFNumberRef number_cf = base::mac::CFCastStrict<CFNumberRef>(property_cf);
|
||||
CFNumberRef number_cf =
|
||||
base::apple::CFCastStrict<CFNumberRef>(property_cf);
|
||||
NSNumber* number_ns = base::apple::CFToNSPtrCast(number_cf);
|
||||
switch (CFNumberGetType(number_cf)) {
|
||||
case kCFNumberSInt8Type:
|
||||
@ -109,12 +110,12 @@ launch_data_t CFPropertyToLaunchData(CFPropertyListRef property_cf) {
|
||||
|
||||
} else if (type_id_cf == CFBooleanGetTypeID()) {
|
||||
CFBooleanRef boolean_cf =
|
||||
base::mac::CFCastStrict<CFBooleanRef>(property_cf);
|
||||
base::apple::CFCastStrict<CFBooleanRef>(property_cf);
|
||||
data_launch = LaunchDataNewBool(CFBooleanGetValue(boolean_cf));
|
||||
|
||||
} else if (type_id_cf == CFStringGetTypeID()) {
|
||||
NSString* string_ns = base::apple::CFToNSPtrCast(
|
||||
base::mac::CFCastStrict<CFStringRef>(property_cf));
|
||||
base::apple::CFCastStrict<CFStringRef>(property_cf));
|
||||
|
||||
// -fileSystemRepresentation might be more correct than -UTF8String,
|
||||
// because these strings can hold paths. The analogous function in
|
||||
@ -126,7 +127,7 @@ launch_data_t CFPropertyToLaunchData(CFPropertyListRef property_cf) {
|
||||
|
||||
} else if (type_id_cf == CFDataGetTypeID()) {
|
||||
NSData* data_ns = base::apple::CFToNSPtrCast(
|
||||
base::mac::CFCastStrict<CFDataRef>(property_cf));
|
||||
base::apple::CFCastStrict<CFDataRef>(property_cf));
|
||||
data_launch = LaunchDataNewOpaque([data_ns bytes], [data_ns length]);
|
||||
} else {
|
||||
base::ScopedCFTypeRef<CFStringRef> type_name_cf(
|
||||
|
@ -21,10 +21,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#include "base/apple/foundation_util.h"
|
||||
#include "base/apple/scoped_cftyperef.h"
|
||||
#include "base/check_op.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/mac/scoped_cftyperef.h"
|
||||
#include "base/mac/scoped_ioobject.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
@ -168,7 +168,7 @@ std::string IORegistryEntryDataPropertyAsString(io_registry_entry_t entry,
|
||||
CFStringRef key) {
|
||||
base::ScopedCFTypeRef<CFTypeRef> property(
|
||||
IORegistryEntryCreateCFProperty(entry, key, kCFAllocatorDefault, 0));
|
||||
CFDataRef data = base::mac::CFCast<CFDataRef>(property);
|
||||
CFDataRef data = base::apple::CFCast<CFDataRef>(property);
|
||||
if (data && CFDataGetLength(data) > 0) {
|
||||
return reinterpret_cast<const char*>(CFDataGetBytePtr(data));
|
||||
}
|
||||
@ -244,7 +244,7 @@ bool MacOSVersionComponents(int* major,
|
||||
|
||||
bool success = true;
|
||||
|
||||
CFStringRef version_cf = base::mac::CFCast<CFStringRef>(
|
||||
CFStringRef version_cf = base::apple::CFCast<CFStringRef>(
|
||||
TryCFDictionaryGetValue(dictionary, _kCFSystemVersionProductVersionKey));
|
||||
std::string version;
|
||||
if (!version_cf) {
|
||||
@ -264,7 +264,7 @@ bool MacOSVersionComponents(int* major,
|
||||
}
|
||||
}
|
||||
|
||||
CFStringRef build_cf = base::mac::CFCast<CFStringRef>(
|
||||
CFStringRef build_cf = base::apple::CFCast<CFStringRef>(
|
||||
TryCFDictionaryGetValue(dictionary, _kCFSystemVersionBuildVersionKey));
|
||||
if (!build_cf) {
|
||||
LOG(ERROR) << "build_cf not found";
|
||||
@ -273,7 +273,7 @@ bool MacOSVersionComponents(int* major,
|
||||
build->assign(base::SysCFStringRefToUTF8(build_cf));
|
||||
}
|
||||
|
||||
CFStringRef product_cf = base::mac::CFCast<CFStringRef>(
|
||||
CFStringRef product_cf = base::apple::CFCast<CFStringRef>(
|
||||
TryCFDictionaryGetValue(dictionary, _kCFSystemVersionProductNameKey));
|
||||
std::string product;
|
||||
if (!product_cf) {
|
||||
@ -284,8 +284,9 @@ bool MacOSVersionComponents(int* major,
|
||||
}
|
||||
|
||||
// This key is not required, and in fact is normally not present.
|
||||
CFStringRef extra_cf = base::mac::CFCast<CFStringRef>(TryCFDictionaryGetValue(
|
||||
dictionary, _kCFSystemVersionProductVersionExtraKey));
|
||||
CFStringRef extra_cf =
|
||||
base::apple::CFCast<CFStringRef>(TryCFDictionaryGetValue(
|
||||
dictionary, _kCFSystemVersionProductVersionExtraKey));
|
||||
std::string extra;
|
||||
if (extra_cf) {
|
||||
extra = base::SysCFStringRefToUTF8(extra_cf);
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/apple/bridging.h"
|
||||
#include "base/mac/scoped_cftyperef.h"
|
||||
#include "base/apple/scoped_cftyperef.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#include "base/apple/bridging.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/apple/foundation_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
@ -153,12 +153,12 @@ NSString* UserAgentString() {
|
||||
|
||||
// Expected to be CFNetwork.
|
||||
NSBundle* nsurl_bundle = [NSBundle bundleForClass:[NSURLRequest class]];
|
||||
NSString* bundle_name = base::mac::ObjCCast<NSString>([nsurl_bundle
|
||||
NSString* bundle_name = base::apple::ObjCCast<NSString>([nsurl_bundle
|
||||
objectForInfoDictionaryKey:base::apple::CFToNSPtrCast(kCFBundleNameKey)]);
|
||||
if (bundle_name) {
|
||||
user_agent = AppendEscapedFormat(user_agent, @" %@", bundle_name);
|
||||
|
||||
NSString* bundle_version = base::mac::ObjCCast<NSString>(
|
||||
NSString* bundle_version = base::apple::ObjCCast<NSString>(
|
||||
[nsurl_bundle objectForInfoDictionaryKey:base::apple::CFToNSPtrCast(
|
||||
kCFBundleVersionKey)]);
|
||||
if (bundle_version) {
|
||||
@ -268,7 +268,7 @@ bool HTTPTransportMac::ExecuteSynchronously(std::string* response_body) {
|
||||
return false;
|
||||
}
|
||||
NSHTTPURLResponse* http_response =
|
||||
base::mac::ObjCCast<NSHTTPURLResponse>(response);
|
||||
base::apple::ObjCCast<NSHTTPURLResponse>(response);
|
||||
if (!http_response) {
|
||||
LOG(ERROR) << "no http_response";
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user