Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: content/browser/gamepad/xbox_data_fetcher_mac.cc

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gamepad/xbox_data_fetcher_mac.h ('k') | content/browser/power_save_blocker_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gamepad/xbox_data_fetcher_mac.cc
diff --git a/content/browser/gamepad/xbox_data_fetcher_mac.cc b/content/browser/gamepad/xbox_data_fetcher_mac.cc
index a3239f7605e43ecef6b5828e679fbce54e9c13b2..6619b9b48f7a02997aa13cf1fd42449b4ebee3a1 100644
--- a/content/browser/gamepad/xbox_data_fetcher_mac.cc
+++ b/content/browser/gamepad/xbox_data_fetcher_mac.cc
@@ -495,12 +495,12 @@ void XboxDataFetcher::DeviceRemoved(void* context, io_iterator_t iterator) {
io_service_t ref;
while ((ref = IOIteratorNext(iterator))) {
base::mac::ScopedIOObject<io_service_t> scoped_ref(ref);
- base::mac::ScopedCFTypeRef<CFNumberRef> number(
- base::mac::CFCastStrict<CFNumberRef>(IORegistryEntryCreateCFProperty(
- ref,
- CFSTR(kUSBDevicePropertyLocationID),
- kCFAllocatorDefault,
- kNilOptions)));
+ base::ScopedCFTypeRef<CFNumberRef> number(
+ base::mac::CFCastStrict<CFNumberRef>(
+ IORegistryEntryCreateCFProperty(ref,
+ CFSTR(kUSBDevicePropertyLocationID),
+ kCFAllocatorDefault,
+ kNilOptions)));
UInt32 location_id = 0;
CFNumberGetValue(number, kCFNumberSInt32Type, &location_id);
fetcher->RemoveControllerByLocationID(location_id);
@@ -510,13 +510,11 @@ void XboxDataFetcher::DeviceRemoved(void* context, io_iterator_t iterator) {
bool XboxDataFetcher::RegisterForNotifications() {
if (listening_)
return true;
- base::mac::ScopedCFTypeRef<CFNumberRef> vendor_cf(
- CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type,
- &kVendorMicrosoft));
- base::mac::ScopedCFTypeRef<CFNumberRef> product_cf(
- CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type,
- &kProduct360Controller));
- base::mac::ScopedCFTypeRef<CFMutableDictionaryRef> matching_dict(
+ base::ScopedCFTypeRef<CFNumberRef> vendor_cf(CFNumberCreate(
+ kCFAllocatorDefault, kCFNumberSInt32Type, &kVendorMicrosoft));
+ base::ScopedCFTypeRef<CFNumberRef> product_cf(CFNumberCreate(
+ kCFAllocatorDefault, kCFNumberSInt32Type, &kProduct360Controller));
+ base::ScopedCFTypeRef<CFMutableDictionaryRef> matching_dict(
IOServiceMatching(kIOUSBDeviceClassName));
if (!matching_dict)
return false;
« no previous file with comments | « content/browser/gamepad/xbox_data_fetcher_mac.h ('k') | content/browser/power_save_blocker_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698