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

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

Issue 551843003: Persist Directory to disk when the app is backgrounded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test and use SyncBackendHostCore::SaveChanges(). Created 6 years, 3 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.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 3135388b8dad8ae28df88fcd3c09234c5a3eef34..85c62a24c32b4237590c1f48beab4b95de9889b0 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -2729,3 +2729,10 @@ bool ProfileSyncService::NeedBackup() const {
base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const {
return device_info_sync_service_->GetLocalDeviceBackupTime();
}
+
+void ProfileSyncService::FlushDirectory() const {
+ // backend_initialized_ implies backend_ isn't NULL and the manager exists.
+ // If sync is not initialized yet, we fail silently.
+ if (backend_initialized_)
+ backend_->FlushDirectory();
+}

Powered by Google App Engine
This is Rietveld 408576698