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

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: 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/glue/sync_backend_host.h ('k') | chrome/browser/sync/glue/sync_backend_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4915f0d831c9d0345018fbac1891a00b9a67d1d4 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 sync manager to persist its state by writing to disk.
+ // 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_;
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.h ('k') | chrome/browser/sync/glue/sync_backend_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698