summaryrefslogtreecommitdiffstats
path: root/base
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 /base
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 'base')
-rw-r--r--base/ios/device_util.mm12
-rw-r--r--base/mac/foundation_util.mm5
-rw-r--r--base/mac/launch_services_util.cc5
-rw-r--r--base/message_loop/message_pump_io_ios.cc13
-rw-r--r--base/message_loop/message_pump_io_ios.h2
-rw-r--r--base/native_library_mac.mm16
-rw-r--r--base/strings/sys_string_conversions_mac.mm15
-rw-r--r--base/time_mac.cc8
8 files changed, 35 insertions, 41 deletions
diff --git a/base/ios/device_util.mm b/base/ios/device_util.mm
index 96968df..9600833 100644
--- a/base/ios/device_util.mm
+++ b/base/ios/device_util.mm
@@ -119,9 +119,9 @@ std::string GetMacAddress(const std::string& interface_name) {
}
std::string GetRandomId() {
- base::mac::ScopedCFTypeRef<CFUUIDRef>
- uuid_object(CFUUIDCreate(kCFAllocatorDefault));
- base::mac::ScopedCFTypeRef<CFStringRef> uuid_string(
+ base::ScopedCFTypeRef<CFUUIDRef> uuid_object(
+ CFUUIDCreate(kCFAllocatorDefault));
+ base::ScopedCFTypeRef<CFStringRef> uuid_string(
CFUUIDCreateString(kCFAllocatorDefault, uuid_object));
return base::SysCFStringRefToUTF8(uuid_string);
}
@@ -154,9 +154,9 @@ std::string GetDeviceIdentifier(const char* salt) {
CC_SHA256([hash_data bytes], [hash_data length], hash);
CFUUIDBytes* uuid_bytes = reinterpret_cast<CFUUIDBytes*>(hash);
- base::mac::ScopedCFTypeRef<CFUUIDRef>
- uuid_object(CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault, *uuid_bytes));
- base::mac::ScopedCFTypeRef<CFStringRef> device_id(
+ base::ScopedCFTypeRef<CFUUIDRef> uuid_object(
+ CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault, *uuid_bytes));
+ base::ScopedCFTypeRef<CFStringRef> device_id(
CFUUIDCreateString(kCFAllocatorDefault, uuid_object));
return base::SysCFStringRefToUTF8(device_id);
}
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index 71e8942..1897b6f 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -383,9 +383,8 @@ std::ostream& operator<<(std::ostream& o, const CFStringRef string) {
}
std::ostream& operator<<(std::ostream& o, const CFErrorRef err) {
- base::mac::ScopedCFTypeRef<CFStringRef> desc(CFErrorCopyDescription(err));
- base::mac::ScopedCFTypeRef<CFDictionaryRef> user_info(
- CFErrorCopyUserInfo(err));
+ base::ScopedCFTypeRef<CFStringRef> desc(CFErrorCopyDescription(err));
+ base::ScopedCFTypeRef<CFDictionaryRef> user_info(CFErrorCopyUserInfo(err));
CFStringRef errorDesc = NULL;
if (user_info.get()) {
errorDesc = reinterpret_cast<CFStringRef>(
diff --git a/base/mac/launch_services_util.cc b/base/mac/launch_services_util.cc
index c24d864..0081500 100644
--- a/base/mac/launch_services_util.cc
+++ b/base/mac/launch_services_util.cc
@@ -25,7 +25,7 @@ bool OpenApplicationWithPath(const base::FilePath& bundle_path,
std::vector<std::string> argv = command_line.argv();
int argc = argv.size();
- base::mac::ScopedCFTypeRef<CFMutableArrayRef> launch_args(
+ base::ScopedCFTypeRef<CFMutableArrayRef> launch_args(
CFArrayCreateMutable(NULL, argc - 1, &kCFTypeArrayCallBacks));
if (!launch_args) {
LOG(ERROR) << "CFArrayCreateMutable failed, size was " << argc;
@@ -35,8 +35,7 @@ bool OpenApplicationWithPath(const base::FilePath& bundle_path,
for (int i = 1; i < argc; ++i) {
const std::string& arg(argv[i]);
- base::mac::ScopedCFTypeRef<CFStringRef> arg_cf(
- base::SysUTF8ToCFStringRef(arg));
+ base::ScopedCFTypeRef<CFStringRef> arg_cf(base::SysUTF8ToCFStringRef(arg));
if (!arg_cf) {
LOG(ERROR) << "base::SysUTF8ToCFStringRef failed for " << arg;
return false;
diff --git a/base/message_loop/message_pump_io_ios.cc b/base/message_loop/message_pump_io_ios.cc
index 5868195..7b1e0f4 100644
--- a/base/message_loop/message_pump_io_ios.cc
+++ b/base/message_loop/message_pump_io_ios.cc
@@ -99,9 +99,9 @@ bool MessagePumpIOSForIO::WatchFileDescriptor(
CFFileDescriptorRef fdref = controller->fdref_;
if (fdref == NULL) {
- base::mac::ScopedCFTypeRef<CFFileDescriptorRef> scoped_fdref(
- CFFileDescriptorCreate(kCFAllocatorDefault, fd, false, HandleFdIOEvent,
- &source_context));
+ base::ScopedCFTypeRef<CFFileDescriptorRef> scoped_fdref(
+ CFFileDescriptorCreate(
+ kCFAllocatorDefault, fd, false, HandleFdIOEvent, &source_context));
if (scoped_fdref == NULL) {
NOTREACHED() << "CFFileDescriptorCreate failed";
return false;
@@ -110,10 +110,9 @@ bool MessagePumpIOSForIO::WatchFileDescriptor(
CFFileDescriptorEnableCallBacks(scoped_fdref, callback_types);
// TODO(wtc): what should the 'order' argument be?
- base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> scoped_fd_source(
- CFFileDescriptorCreateRunLoopSource(kCFAllocatorDefault,
- scoped_fdref,
- 0));
+ base::ScopedCFTypeRef<CFRunLoopSourceRef> scoped_fd_source(
+ CFFileDescriptorCreateRunLoopSource(
+ kCFAllocatorDefault, scoped_fdref, 0));
if (scoped_fd_source == NULL) {
NOTREACHED() << "CFFileDescriptorCreateRunLoopSource failed";
return false;
diff --git a/base/message_loop/message_pump_io_ios.h b/base/message_loop/message_pump_io_ios.h
index 3aaf037..6596862b 100644
--- a/base/message_loop/message_pump_io_ios.h
+++ b/base/message_loop/message_pump_io_ios.h
@@ -81,7 +81,7 @@ class BASE_EXPORT MessagePumpIOSForIO : public MessagePumpNSRunLoop {
bool is_persistent_; // false if this event is one-shot.
base::mac::ScopedCFFileDescriptorRef fdref_;
CFOptionFlags callback_types_;
- base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> fd_source_;
+ base::ScopedCFTypeRef<CFRunLoopSourceRef> fd_source_;
scoped_refptr<MessagePumpIOSForIO> pump_;
Watcher* watcher_;
diff --git a/base/native_library_mac.mm b/base/native_library_mac.mm
index 1134744..15f9e88 100644
--- a/base/native_library_mac.mm
+++ b/base/native_library_mac.mm
@@ -56,12 +56,11 @@ NativeLibrary LoadNativeLibrary(const base::FilePath& library_path,
native_lib->objc_status = OBJC_UNKNOWN;
return native_lib;
}
- base::mac::ScopedCFTypeRef<CFURLRef> url(
- CFURLCreateFromFileSystemRepresentation(
- kCFAllocatorDefault,
- (const UInt8*)library_path.value().c_str(),
- library_path.value().length(),
- true));
+ base::ScopedCFTypeRef<CFURLRef> url(CFURLCreateFromFileSystemRepresentation(
+ kCFAllocatorDefault,
+ (const UInt8*)library_path.value().c_str(),
+ library_path.value().length(),
+ true));
if (!url)
return NULL;
CFBundleRef bundle = CFBundleCreate(kCFAllocatorDefault, url.get());
@@ -103,9 +102,8 @@ void* GetFunctionPointerFromNativeLibrary(NativeLibrary library,
// Get the function pointer using the right API for the type.
if (library->type == BUNDLE) {
- base::mac::ScopedCFTypeRef<CFStringRef> symbol_name(
- CFStringCreateWithCString(kCFAllocatorDefault, name,
- kCFStringEncodingUTF8));
+ base::ScopedCFTypeRef<CFStringRef> symbol_name(CFStringCreateWithCString(
+ kCFAllocatorDefault, name, kCFStringEncodingUTF8));
function_pointer = CFBundleGetFunctionPointerForName(library->bundle,
symbol_name);
} else {
diff --git a/base/strings/sys_string_conversions_mac.mm b/base/strings/sys_string_conversions_mac.mm
index 3650e4ef..9479e78 100644
--- a/base/strings/sys_string_conversions_mac.mm
+++ b/base/strings/sys_string_conversions_mac.mm
@@ -78,14 +78,13 @@ static OutStringType STLStringToSTLStringWithEncodingsT(
if (in_length == 0)
return OutStringType();
- base::mac::ScopedCFTypeRef<CFStringRef> cfstring(
- CFStringCreateWithBytesNoCopy(NULL,
- reinterpret_cast<const UInt8*>(in.data()),
- in_length *
- sizeof(typename InStringType::value_type),
- in_encoding,
- false,
- kCFAllocatorNull));
+ base::ScopedCFTypeRef<CFStringRef> cfstring(CFStringCreateWithBytesNoCopy(
+ NULL,
+ reinterpret_cast<const UInt8*>(in.data()),
+ in_length * sizeof(typename InStringType::value_type),
+ in_encoding,
+ false,
+ kCFAllocatorNull));
if (!cfstring)
return OutStringType();
diff --git a/base/time_mac.cc b/base/time_mac.cc
index 883a35b..91e9864 100644
--- a/base/time_mac.cc
+++ b/base/time_mac.cc
@@ -139,8 +139,8 @@ Time Time::FromExploded(bool is_local, const Exploded& exploded) {
date.month = exploded.month;
date.year = exploded.year;
- base::mac::ScopedCFTypeRef<CFTimeZoneRef>
- time_zone(is_local ? CFTimeZoneCopySystem() : NULL);
+ base::ScopedCFTypeRef<CFTimeZoneRef> time_zone(
+ is_local ? CFTimeZoneCopySystem() : NULL);
CFAbsoluteTime seconds = CFGregorianDateGetAbsoluteTime(date, time_zone) +
kCFAbsoluteTimeIntervalSince1970;
return Time(static_cast<int64>(seconds * kMicrosecondsPerSecond) +
@@ -157,8 +157,8 @@ void Time::Explode(bool is_local, Exploded* exploded) const {
kWindowsEpochDeltaSeconds -
kCFAbsoluteTimeIntervalSince1970;
- base::mac::ScopedCFTypeRef<CFTimeZoneRef>
- time_zone(is_local ? CFTimeZoneCopySystem() : NULL);
+ base::ScopedCFTypeRef<CFTimeZoneRef> time_zone(
+ is_local ? CFTimeZoneCopySystem() : NULL);
CFGregorianDate date = CFAbsoluteTimeGetGregorianDate(seconds, time_zone);
// 1 = Monday, ..., 7 = Sunday.
int cf_day_of_week = CFAbsoluteTimeGetDayOfWeek(seconds, time_zone);