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

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: Address nits. 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cb699d83b8c6b46e8198232b648433a13aab2d35..eb76001e7fd1e646b9f9bdb514b4ec0be0d7a5b2 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -2707,3 +2707,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();
+}
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698