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

Unified Diff: chrome/browser/sync/profile_sync_service.h

Issue 11043012: [Sync] Notify invalidation handlers when sync is disabled/enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 2 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 | « no previous file | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.h
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index bfeb6761c9e3d096e6ab9e124a388efd8b696db9..7bac085f84a16e970600c5248b888175444a32e7 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -715,6 +715,11 @@ class ProfileSyncService : public ProfileSyncServiceBase,
bool delete_sync_database,
UnrecoverableErrorReason reason);
+ // Must be called every time |backend_initialized_| or
+ // |invalidator_state_| is changed (but only if
+ // |invalidator_registrar_| is not NULL).
+ void UpdateInvalidatorRegistrarState();
+
// Destroys / recreates an instance of ProfileSyncService. Used exclusively by
// the sync integration tests so they can restart sync from scratch without
// tearing down and recreating the browser process. Needed because simply
@@ -843,6 +848,12 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// Factory the backend will use to build the SyncManager.
syncer::SyncManagerFactory sync_manager_factory_;
+ // Holds the current invalidator state as updated by
+ // OnInvalidatorStateChange(). Note that this is different from the
+ // state known by |invalidator_registrar_| (See
+ // UpdateInvalidatorState()).
+ syncer::InvalidatorState invalidator_state_;
+
// Dispatches invalidations to handlers. Set in Initialize() and
// unset in Shutdown().
scoped_ptr<syncer::InvalidatorRegistrar> invalidator_registrar_;
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698