diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-10 04:07:19 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-10 04:07:19 +0000 |
commit | 6529382867932acbf83e49bc107fbe4ea28ad311 (patch) | |
tree | 9baba790501b4c0e95b59ca72b5c769ca5a28190 /sync/internal_api/public/sync_manager.h | |
parent | bfe14502edd281a935198917fc49e30fbef47792 (diff) | |
download | chromium_src-6529382867932acbf83e49bc107fbe4ea28ad311.zip chromium_src-6529382867932acbf83e49bc107fbe4ea28ad311.tar.gz chromium_src-6529382867932acbf83e49bc107fbe4ea28ad311.tar.bz2 |
[Sync] Avoid unregistering object IDs on shutdown
Add RegisterHandler() and UnregisterHandler(), which should be called before and after calls to UpdateRegisteredIds(). Use UnregisterHandler() on
shutdown instead of UpdateRegisteredIds(_, ObjectIdSet()).
Make SyncNotifierHelper non-thread-safe. Fix test breakages that this revealed. Also add GetAllRegisteredIds() instead of making it the return value of UpdateRegisteredIds().
Propagate UpdateRegisteredIds()/RegisterHandler()/UnregisterHandler() all
the way up to ProfileSyncService.
Make FakeSyncManager be created on the sync thread.
Clean up SyncBackendHost startup/shutdown behavior a bit.
BUG=140325
Review URL: https://chromiumcodereview.appspot.com/10824161
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150990 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/sync_manager.h')
-rw-r--r-- | sync/internal_api/public/sync_manager.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h index 0cb6a4c..01d919c 100644 --- a/sync/internal_api/public/sync_manager.h +++ b/sync/internal_api/public/sync_manager.h @@ -407,12 +407,19 @@ class SyncManager { virtual void UpdateEnabledTypes( const ModelTypeSet& enabled_types) = 0; - // Forwards to the underlying notifier (see - // SyncNotifier::UpdateRegisteredIds()). + // Forwards to the underlying notifier (see comments in sync_notifier.h). + virtual void RegisterInvalidationHandler( + SyncNotifierObserver* handler) = 0; + + // Forwards to the underlying notifier (see comments in sync_notifier.h). virtual void UpdateRegisteredInvalidationIds( SyncNotifierObserver* handler, const ObjectIdSet& ids) = 0; + // Forwards to the underlying notifier (see comments in sync_notifier.h). + virtual void UnregisterInvalidationHandler( + SyncNotifierObserver* handler) = 0; + // Put the syncer in normal mode ready to perform nudges and polls. virtual void StartSyncingNormally( const ModelSafeRoutingInfo& routing_info) = 0; |