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

Side by Side Diff: components/sync_driver/device_info.cc

Issue 597423002: Device info datatype should be moved to components/sync_driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor CR feedback addressed. Created 6 years, 2 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
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 "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
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
OLDNEW
« no previous file with comments | « components/sync_driver/device_info.h ('k') | components/sync_driver/device_info_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698