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

Side by Side Diff: sync/util/get_session_name_mac.mm

Issue 13322003: Update the remaining references to sys_string_conversions.h to its new location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/util/get_session_name_mac.h" 5 #include "sync/util/get_session_name_mac.h"
6 6
7 #import <SystemConfiguration/SCDynamicStoreCopySpecific.h> 7 #import <SystemConfiguration/SCDynamicStoreCopySpecific.h>
8 #include <sys/sysctl.h> 8 #include <sys/sysctl.h>
9 9
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/sys_string_conversions.h" 12 #include "base/strings/sys_string_conversions.h"
13 13
14 namespace syncer { 14 namespace syncer {
15 namespace internal { 15 namespace internal {
16 16
17 std::string GetHardwareModelName() { 17 std::string GetHardwareModelName() {
18 // Do not use NSHost currentHost, as it's very slow. http://crbug.com/138570 18 // Do not use NSHost currentHost, as it's very slow. http://crbug.com/138570
19 SCDynamicStoreContext context = { 0, NULL, NULL, NULL }; 19 SCDynamicStoreContext context = { 0, NULL, NULL, NULL };
20 base::mac::ScopedCFTypeRef<SCDynamicStoreRef> store( 20 base::mac::ScopedCFTypeRef<SCDynamicStoreRef> store(
21 SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("chrome_sync"), 21 SCDynamicStoreCreate(kCFAllocatorDefault, CFSTR("chrome_sync"),
22 NULL, &context)); 22 NULL, &context));
(...skipping 17 matching lines...) Expand all
40 if (IsAsciiDigit(modelBuffer[i])) 40 if (IsAsciiDigit(modelBuffer[i]))
41 return std::string(modelBuffer, 0, i); 41 return std::string(modelBuffer, 0, i);
42 } 42 }
43 return std::string(modelBuffer, 0, length); 43 return std::string(modelBuffer, 0, length);
44 } 44 }
45 return "Unknown"; 45 return "Unknown";
46 } 46 }
47 47
48 } // namespace internal 48 } // namespace internal
49 } // namespace syncer 49 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698