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

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 thread check and fix a comment. 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 6375c3448ddd62828392a5a0aca4d5e7f39352de..d248a8d9c3a0e09fcc2b6e099f05305c75d4cefc 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -2767,3 +2767,10 @@ bool ProfileSyncService::NeedBackup() const {
base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const {
return backend_->GetSyncedDeviceTracker()->GetLocalDeviceBackupTime();
}
+
+void ProfileSyncService::FlushDirectory() const {
+ // If the user is signed out of sync, backend can be NULL.
+ if (backend_ != NULL) {
Nicolas Zea 2014/09/15 22:38:59 nit: no curly braces for single line conditional (
maxbogue 2014/09/16 15:34:31 Done. This should be against the Chrome style guid
+ backend_->FlushDirectory();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698