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

Unified Diff: chrome/browser/sync/profile_sync_service.h

Issue 332923002: [sync] Add backup time in synced device info so that server can flag device (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/profile_sync_service.h
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index d4e85ef5ee2184c3d4a06f0efc5b389169214bee..91730f4cf83fffdd0a2ef0363d9c482dbcac4b8a 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -769,6 +769,8 @@ class ProfileSyncService : public ProfileSyncServiceBase,
void SetClearingBrowseringDataForTesting(
base::Callback<void(Profile*, base::Time, base::Time)> c);
+ base::Time GetDeviceBackupTimeForTesting() const;
+
protected:
// Helper to configure the priority data types.
void ConfigurePriorityDataTypes();
@@ -944,6 +946,12 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// Clear browsing data since first sync during rollback.
void ClearBrowsingDataSinceFirstSync();
+ // Post background task to check sync backup DB state if needed.
+ void CheckSyncBackupIfNeeded();
+
+ // Callback to receive backup DB check result.
+ void CheckSyncBackupCallback(base::Time backup_time);
+
// Factory used to create various dependent objects.
scoped_ptr<ProfileSyncComponentsFactory> factory_;
@@ -1110,6 +1118,10 @@ class ProfileSyncService : public ProfileSyncServiceBase,
base::Callback<void(Profile*, base::Time, base::Time)> clear_browsing_data_;
+ // Last time when pre-sync data was saved. NULL pointer means backup data
+ // state is unknown. If time value is null, backup data doesn't exist.
+ scoped_ptr<base::Time> last_backup_time_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
};

Powered by Google App Engine
This is Rietveld 408576698