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

Unified Diff: chrome/browser/sync/glue/synced_device_tracker.cc

Issue 395013002: Pass signin_scoped_device_id to DeviceInfoSpecifics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Revers chrome_signin_client Created 6 years, 5 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
Index: chrome/browser/sync/glue/synced_device_tracker.cc
diff --git a/chrome/browser/sync/glue/synced_device_tracker.cc b/chrome/browser/sync/glue/synced_device_tracker.cc
index e77463e3d7df6f0ef7cf986f938852531e5df118..73e8cbb2425e5c65508d2cd59c9fc9a19247f2ad 100644
--- a/chrome/browser/sync/glue/synced_device_tracker.cc
+++ b/chrome/browser/sync/glue/synced_device_tracker.cc
@@ -68,12 +68,13 @@ scoped_ptr<DeviceInfo> SyncedDeviceTracker::ReadLocalDeviceInfo(
}
const sync_pb::DeviceInfoSpecifics& specifics = node.GetDeviceInfoSpecifics();
- return scoped_ptr<DeviceInfo> (
+ return scoped_ptr<DeviceInfo>(
new DeviceInfo(specifics.cache_guid(),
specifics.client_name(),
specifics.chrome_version(),
specifics.sync_user_agent(),
- specifics.device_type()));
+ specifics.device_type(),
+ specifics.signin_scoped_device_id()));
}
scoped_ptr<DeviceInfo> SyncedDeviceTracker::ReadDeviceInfo(
@@ -87,12 +88,13 @@ scoped_ptr<DeviceInfo> SyncedDeviceTracker::ReadDeviceInfo(
}
const sync_pb::DeviceInfoSpecifics& specifics = node.GetDeviceInfoSpecifics();
- return scoped_ptr<DeviceInfo> (
+ return scoped_ptr<DeviceInfo>(
new DeviceInfo(specifics.cache_guid(),
specifics.client_name(),
specifics.chrome_version(),
specifics.sync_user_agent(),
- specifics.device_type()));
+ specifics.device_type(),
+ specifics.signin_scoped_device_id()));
}
void SyncedDeviceTracker::GetAllSyncedDeviceInfo(
@@ -123,12 +125,12 @@ void SyncedDeviceTracker::GetAllSyncedDeviceInfo(
const sync_pb::DeviceInfoSpecifics& specifics =
node.GetDeviceInfoSpecifics();
- device_info->push_back(
- new DeviceInfo(specifics.cache_guid(),
- specifics.client_name(),
- specifics.chrome_version(),
- specifics.sync_user_agent(),
- specifics.device_type()));
+ device_info->push_back(new DeviceInfo(specifics.cache_guid(),
+ specifics.client_name(),
+ specifics.chrome_version(),
+ specifics.sync_user_agent(),
+ specifics.device_type(),
+ specifics.signin_scoped_device_id()));
}
}
@@ -144,11 +146,15 @@ void SyncedDeviceTracker::RemoveObserver(Observer* observer) {
observers_->RemoveObserver(observer);
}
-void SyncedDeviceTracker::InitLocalDeviceInfo(const base::Closure& callback) {
+void SyncedDeviceTracker::InitLocalDeviceInfo(
+ const std::string& signin_scoped_device_id,
+ const base::Closure& callback) {
DeviceInfo::CreateLocalDeviceInfo(
cache_guid_,
+ signin_scoped_device_id,
base::Bind(&SyncedDeviceTracker::InitLocalDeviceInfoContinuation,
- weak_factory_.GetWeakPtr(), callback));
+ weak_factory_.GetWeakPtr(),
+ callback));
}
void SyncedDeviceTracker::InitLocalDeviceInfoContinuation(
@@ -173,6 +179,7 @@ void SyncedDeviceTracker::WriteDeviceInfo(const DeviceInfo& info,
specifics.set_chrome_version(info.chrome_version());
specifics.set_sync_user_agent(info.sync_user_agent());
specifics.set_device_type(info.device_type());
+ specifics.set_signin_scoped_device_id(info.signin_scoped_device_id());
if (node.InitByClientTagLookup(syncer::DEVICE_INFO, tag) ==
syncer::BaseNode::INIT_OK) {
« no previous file with comments | « chrome/browser/sync/glue/synced_device_tracker.h ('k') | chrome/browser/sync/glue/synced_device_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698