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

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

Issue 10824161: [Sync] Avoid unregistering object IDs on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove now-unneeded param Created 8 years, 4 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.h
diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h
index bafe1402f07628a69c6ba5e6ba88ab556163d912..65622b286081ca2689d8c6542ed207bed9700cba 100644
--- a/chrome/browser/sync/glue/sync_backend_host.h
+++ b/chrome/browser/sync/glue/sync_backend_host.h
@@ -180,7 +180,8 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
void UpdateCredentials(const syncer::SyncCredentials& credentials);
// Registers the underlying frontend for the given IDs to the
- // underlying notifier.
+ // underlying notifier. This lasts until StopSyncingForShutdown()
+ // is called.
void UpdateRegisteredInvalidationIds(const syncer::ObjectIdSet& ids);
// This starts the SyncerThread running a Syncer object to communicate with
@@ -211,9 +212,11 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
bool SetDecryptionPassphrase(const std::string& passphrase)
WARN_UNUSED_RESULT;
- // Called on |frontend_loop_| to kick off shutdown procedure. After this,
- // no further sync activity will occur with the sync server and no further
- // change applications will occur from changes already downloaded.
+ // Called on |frontend_loop_| to kick off shutdown procedure. After
+ // this, no further sync activity will occur with the sync server
+ // and no further change applications will occur from changes
+ // already downloaded. Furthermore, no notifications are sent to
+ // any invalidation handler.
virtual void StopSyncingForShutdown();
// Called on |frontend_loop_| to kick off shutdown.
@@ -530,6 +533,10 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// UI-thread cache of the last SyncSessionSnapshot received from syncapi.
syncer::sessions::SyncSessionSnapshot last_snapshot_;
+ // Whether or not we propagate notifications to invalidation
+ // handlers.
+ bool propagate_invalidations_;
+
DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
};

Powered by Google App Engine
This is Rietveld 408576698