OLD | NEW |
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 "base/values.h" | 5 #include "base/values.h" |
6 #include "chrome/browser/sync/glue/device_info.h" | 6 #include "components/sync_driver/device_info.h" |
7 #include "content/public/browser/browser_thread.h" | |
8 #include "sync/util/get_session_name.h" | |
9 | 7 |
10 namespace browser_sync { | 8 namespace sync_driver { |
11 | 9 |
12 DeviceInfo::DeviceInfo(const std::string& guid, | 10 DeviceInfo::DeviceInfo(const std::string& guid, |
13 const std::string& client_name, | 11 const std::string& client_name, |
14 const std::string& chrome_version, | 12 const std::string& chrome_version, |
15 const std::string& sync_user_agent, | 13 const std::string& sync_user_agent, |
16 const sync_pb::SyncEnums::DeviceType device_type, | 14 const sync_pb::SyncEnums::DeviceType device_type, |
17 const std::string& signin_scoped_device_id) | 15 const std::string& signin_scoped_device_id) |
18 : guid_(guid), | 16 : guid_(guid), |
19 client_name_(client_name), | 17 client_name_(client_name), |
20 chrome_version_(chrome_version), | 18 chrome_version_(chrome_version), |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 value->SetString("os", GetOSString()); | 103 value->SetString("os", GetOSString()); |
106 value->SetString("type", GetDeviceTypeString()); | 104 value->SetString("type", GetDeviceTypeString()); |
107 value->SetString("chromeVersion", chrome_version_); | 105 value->SetString("chromeVersion", chrome_version_); |
108 return value; | 106 return value; |
109 } | 107 } |
110 | 108 |
111 void DeviceInfo::set_public_id(std::string id) { | 109 void DeviceInfo::set_public_id(std::string id) { |
112 public_id_ = id; | 110 public_id_ = id; |
113 } | 111 } |
114 | 112 |
115 // static. | 113 } // namespace sync_driver |
116 void DeviceInfo::GetClientName(const GetClientNameCallback& callback) { | |
117 syncer::GetSessionName(content::BrowserThread::GetBlockingPool(), callback); | |
118 } | |
119 | |
120 } // namespace browser_sync | |
OLD | NEW |