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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_core.h

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/glue/sync_backend_host_core.h
diff --git a/chrome/browser/sync/glue/sync_backend_host_core.h b/chrome/browser/sync/glue/sync_backend_host_core.h
index 46fb599e96bc4361854a049102df6ebcc8f98c28..fc0f548f266f75b1a27085cf8b1e0b405ba89636 100644
--- a/chrome/browser/sync/glue/sync_backend_host_core.h
+++ b/chrome/browser/sync/glue/sync_backend_host_core.h
@@ -239,6 +239,11 @@ class SyncBackendHostCore
base::Callback<void(const std::vector<syncer::ModelType>& type,
ScopedVector<base::ListValue>) > callback);
+ // Tell the syncapi to persist its state by writing to disk.
Nicolas Zea 2014/09/30 21:20:22 nit: syncapi -> sync manager
maxbogue 2014/09/30 21:59:34 Done.
+ // Called on the sync thread, both by a timer and, on Android, when the
+ // application is backgrounded.
+ void SaveChanges();
+
private:
friend class base::RefCountedThreadSafe<SyncBackendHostCore>;
friend class SyncBackendHostForProfileSyncTest;
@@ -251,13 +256,6 @@ class SyncBackendHostCore
// be run on; the host's |registrar_->sync_thread()|.
void StartSavingChanges();
- // Invoked periodically to tell the syncapi to persist its state
- // by writing to disk.
- // This is called from the thread we were created on (which is sync thread),
- // using a repeating timer that is kicked off as soon as the SyncManager
- // tells us it completed initialization.
- void SaveChanges();
-
// Name used for debugging.
const std::string name_;

Powered by Google App Engine
This is Rietveld 408576698