diff options
Diffstat (limited to 'sync/util/get_session_name_mac.mm')
-rw-r--r-- | sync/util/get_session_name_mac.mm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sync/util/get_session_name_mac.mm b/sync/util/get_session_name_mac.mm index f576ea7..aa61e2f 100644 --- a/sync/util/get_session_name_mac.mm +++ b/sync/util/get_session_name_mac.mm @@ -17,16 +17,15 @@ namespace internal { std::string GetHardwareModelName() { // Do not use NSHost currentHost, as it's very slow. http://crbug.com/138570 SCDynamicStoreContext context = { 0, NULL, NULL, NULL }; - base::mac::ScopedCFTypeRef<SCDynamicStoreRef> store( - SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("chrome_sync"), - NULL, &context)); - base::mac::ScopedCFTypeRef<CFStringRef> machine_name( + base::ScopedCFTypeRef<SCDynamicStoreRef> store(SCDynamicStoreCreate( + kCFAllocatorDefault, CFSTR("chrome_sync"), NULL, &context)); + base::ScopedCFTypeRef<CFStringRef> machine_name( SCDynamicStoreCopyLocalHostName(store.get())); if (machine_name.get()) return base::SysCFStringRefToUTF8(machine_name.get()); // Fall back to get computer name. - base::mac::ScopedCFTypeRef<CFStringRef> computer_name( + base::ScopedCFTypeRef<CFStringRef> computer_name( SCDynamicStoreCopyComputerName(store.get(), NULL)); if (computer_name.get()) return base::SysCFStringRefToUTF8(computer_name.get()); |