summaryrefslogtreecommitdiffstats
path: root/chrome/common/mac
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 18:49:05 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 18:49:05 +0000
commit3df79f4277938356ae3c7b3ecc25ab6165e8a899 (patch)
treea1a39cd236c8800a13f2f3bf879d69505a2508de /chrome/common/mac
parent8a15ea13737ae2f8444424fc14d1fcd5e42d5218 (diff)
downloadchromium_src-3df79f4277938356ae3c7b3ecc25ab6165e8a899.zip
chromium_src-3df79f4277938356ae3c7b3ecc25ab6165e8a899.tar.gz
chromium_src-3df79f4277938356ae3c7b3ecc25ab6165e8a899.tar.bz2
mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef.
This CL was created fully mechanically by running git grep -l base::mac::ScopedCFTypeRef | xargs sed -i -e 's/base::mac::ScopedCFTypeRef/base::ScopedCFTypeRef/g' git commit -a -m. git clang-format HEAD^ --style=Chromium git commit -a -m. git cl upload -t $TITLE BUG=251957 TBR=mark@chromium.org Review URL: https://codereview.chromium.org/16917011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208245 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/mac')
-rw-r--r--chrome/common/mac/cfbundle_blocker.mm4
-rw-r--r--chrome/common/mac/mock_launchd.cc38
2 files changed, 17 insertions, 25 deletions
diff --git a/chrome/common/mac/cfbundle_blocker.mm b/chrome/common/mac/cfbundle_blocker.mm
index a6cb6fe..e845283 100644
--- a/chrome/common/mac/cfbundle_blocker.mm
+++ b/chrome/common/mac/cfbundle_blocker.mm
@@ -156,7 +156,7 @@ Boolean ChromeCFBundleLoadExecutableAndReturnError(CFBundleRef bundle,
DCHECK(g_original_underscore_cfbundle_load_executable_and_return_error);
- base::mac::ScopedCFTypeRef<CFURLRef> url_cf(CFBundleCopyBundleURL(bundle));
+ base::ScopedCFTypeRef<CFURLRef> url_cf(CFBundleCopyBundleURL(bundle));
scoped_nsobject<NSString> path(base::mac::CFToNSCast(
CFURLCopyFileSystemPath(url_cf, kCFURLPOSIXPathStyle)));
@@ -185,7 +185,7 @@ Boolean ChromeCFBundleLoadExecutableAndReturnError(CFBundleRef bundle,
<< [path fileSystemRepresentation];
if (error) {
- base::mac::ScopedCFTypeRef<CFStringRef> app_bundle_id(
+ base::ScopedCFTypeRef<CFStringRef> app_bundle_id(
base::SysUTF8ToCFStringRef(base::mac::BaseBundleID()));
// 0xb10c10ad = "block load"
diff --git a/chrome/common/mac/mock_launchd.cc b/chrome/common/mac/mock_launchd.cc
index bc08bf8..6a39540 100644
--- a/chrome/common/mac/mock_launchd.cc
+++ b/chrome/common/mac/mock_launchd.cc
@@ -83,12 +83,12 @@ bool MockLaunchd::MakeABundle(const base::FilePath& dst,
}
const UInt8* bundle_root_path =
reinterpret_cast<const UInt8*>(bundle_root->value().c_str());
- base::mac::ScopedCFTypeRef<CFURLRef> url(
+ base::ScopedCFTypeRef<CFURLRef> url(
CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,
bundle_root_path,
bundle_root->value().length(),
true));
- base::mac::ScopedCFTypeRef<CFBundleRef> bundle(
+ base::ScopedCFTypeRef<CFBundleRef> bundle(
CFBundleCreate(kCFAllocatorDefault, url));
return bundle.get();
}
@@ -126,9 +126,8 @@ CFDictionaryRef MockLaunchd::CopyExports() {
CFStringRef env_var =
base::mac::NSToCFCast(GetServiceProcessLaunchDSocketEnvVar());
- base::mac::ScopedCFTypeRef<CFStringRef> socket_path(
- CFStringCreateWithCString(kCFAllocatorDefault, pipe_name_.c_str(),
- kCFStringEncodingUTF8));
+ base::ScopedCFTypeRef<CFStringRef> socket_path(CFStringCreateWithCString(
+ kCFAllocatorDefault, pipe_name_.c_str(), kCFStringEncodingUTF8));
const void *keys[] = { env_var };
const void *values[] = { socket_path };
COMPILE_ASSERT(arraysize(keys) == arraysize(values), array_sizes_must_match);
@@ -151,10 +150,10 @@ CFDictionaryRef MockLaunchd::CopyJobDictionary(CFStringRef label) {
CFStringRef program = CFSTR(LAUNCH_JOBKEY_PROGRAM);
CFStringRef program_pid = CFSTR(LAUNCH_JOBKEY_PID);
const void *keys[] = { program, program_pid };
- base::mac::ScopedCFTypeRef<CFStringRef> path(
+ base::ScopedCFTypeRef<CFStringRef> path(
base::SysUTF8ToCFStringRef(file_.value()));
int process_id = base::GetCurrentProcId();
- base::mac::ScopedCFTypeRef<CFNumberRef> pid(
+ base::ScopedCFTypeRef<CFNumberRef> pid(
CFNumberCreate(NULL, kCFNumberIntType, &process_id));
const void *values[] = { path, pid };
COMPILE_ASSERT(arraysize(keys) == arraysize(values), array_sizes_must_match);
@@ -170,14 +169,11 @@ CFDictionaryRef MockLaunchd::CopyDictionaryByCheckingIn(CFErrorRef* error) {
checkin_called_ = true;
CFStringRef program = CFSTR(LAUNCH_JOBKEY_PROGRAM);
CFStringRef program_args = CFSTR(LAUNCH_JOBKEY_PROGRAMARGUMENTS);
- base::mac::ScopedCFTypeRef<CFStringRef> path(
+ base::ScopedCFTypeRef<CFStringRef> path(
base::SysUTF8ToCFStringRef(file_.value()));
const void *array_values[] = { path.get() };
- base::mac::ScopedCFTypeRef<CFArrayRef> args(
- CFArrayCreate(kCFAllocatorDefault,
- array_values,
- 1,
- &kCFTypeArrayCallBacks));
+ base::ScopedCFTypeRef<CFArrayRef> args(CFArrayCreate(
+ kCFAllocatorDefault, array_values, 1, &kCFTypeArrayCallBacks));
if (!create_socket_) {
const void *keys[] = { program, program_args };
@@ -210,7 +206,7 @@ CFDictionaryRef MockLaunchd::CopyDictionaryByCheckingIn(CFErrorRef* error) {
signature.protocol = 0;
size_t unix_addr_len = offsetof(struct sockaddr_un,
sun_path) + path_len + 1;
- base::mac::ScopedCFTypeRef<CFDataRef> address(
+ base::ScopedCFTypeRef<CFDataRef> address(
CFDataCreate(NULL, reinterpret_cast<UInt8*>(&unix_addr), unix_addr_len));
signature.address = address;
@@ -227,20 +223,17 @@ CFDictionaryRef MockLaunchd::CopyDictionaryByCheckingIn(CFErrorRef* error) {
return NULL;
}
- base::mac::ScopedCFTypeRef<CFNumberRef> socket_fd(
+ base::ScopedCFTypeRef<CFNumberRef> socket_fd(
CFNumberCreate(NULL, kCFNumberIntType, &local_pipe));
const void *socket_array_values[] = { socket_fd };
- base::mac::ScopedCFTypeRef<CFArrayRef> sockets(
- CFArrayCreate(kCFAllocatorDefault,
- socket_array_values,
- 1,
- &kCFTypeArrayCallBacks));
+ base::ScopedCFTypeRef<CFArrayRef> sockets(CFArrayCreate(
+ kCFAllocatorDefault, socket_array_values, 1, &kCFTypeArrayCallBacks));
CFStringRef socket_dict_key = CFSTR("ServiceProcessSocket");
const void *socket_keys[] = { socket_dict_key };
const void *socket_values[] = { sockets };
COMPILE_ASSERT(arraysize(socket_keys) == arraysize(socket_values),
socket_array_sizes_must_match);
- base::mac::ScopedCFTypeRef<CFDictionaryRef> socket_dict(
+ base::ScopedCFTypeRef<CFDictionaryRef> socket_dict(
CFDictionaryCreate(kCFAllocatorDefault,
socket_keys,
socket_values,
@@ -277,8 +270,7 @@ CFMutableDictionaryRef MockLaunchd::CreatePlistFromFile(
Domain domain,
Type type,
CFStringRef name) {
- base::mac::ScopedCFTypeRef<CFDictionaryRef> dict(
- CopyDictionaryByCheckingIn(NULL));
+ base::ScopedCFTypeRef<CFDictionaryRef> dict(CopyDictionaryByCheckingIn(NULL));
return CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, dict);
}