summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/glue/synced_device_tracker.h
diff options
context:
space:
mode:
authorhaitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-14 22:41:55 +0000
committerhaitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-14 22:41:55 +0000
commit09301f4955d25207a842f905ef2942842f6e0dff (patch)
tree06b9ee6559ee40e25d16021b9bacd30c31cd511c /chrome/browser/sync/glue/synced_device_tracker.h
parent99132862d26d3eeff3c875337ee704549c3fa37d (diff)
downloadchromium_src-09301f4955d25207a842f905ef2942842f6e0dff.zip
chromium_src-09301f4955d25207a842f905ef2942842f6e0dff.tar.gz
chromium_src-09301f4955d25207a842f905ef2942842f6e0dff.tar.bz2
[sync] Add backup time in synced device info so that server knows which device can be rolled back to when.
Backup DB is checked and backup time in device info is updated periodically to keep server informed about backup state. BUG=362679 TBR=gbillock@chromium.org Review URL: https://codereview.chromium.org/332923002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue/synced_device_tracker.h')
-rw-r--r--chrome/browser/sync/glue/synced_device_tracker.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/sync/glue/synced_device_tracker.h b/chrome/browser/sync/glue/synced_device_tracker.h
index 3f0844a..1bc2d66 100644
--- a/chrome/browser/sync/glue/synced_device_tracker.h
+++ b/chrome/browser/sync/glue/synced_device_tracker.h
@@ -61,6 +61,13 @@ class SyncedDeviceTracker : public ChangeProcessor {
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
+ // Update |backup_timestamp| in local device info specifics to |backup_time|
+ // if different.
+ void UpdateLocalDeviceBackupTime(base::Time backup_time);
+
+ // Return time derived from |backup_timestamp| in local device info specifics.
+ base::Time GetLocalDeviceBackupTime() const;
+
private:
friend class SyncedDeviceTrackerTest;
@@ -72,8 +79,7 @@ class SyncedDeviceTracker : public ChangeProcessor {
// Helper to write arbitrary device info. Useful for writing local device
// info and also used by test cases to write arbitrary device infos.
- void WriteDeviceInfo(const sync_pb::DeviceInfoSpecifics& specifics,
- const std::string& tag);
+ void WriteDeviceInfo(const DeviceInfo& info, const std::string& tag);
syncer::UserShare* user_share_;
const std::string cache_guid_;