diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-25 00:29:32 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-25 00:29:32 +0000 |
commit | 389f566a8d88ba4849dc1c2179e00bf64b1d1b39 (patch) | |
tree | ad64c2dbf6b004f43fe3e8a0e7bd539f223a51f4 /sync/internal_api/sync_manager_impl.h | |
parent | ccdcf4375d9a79dcea5d92692db30ae199ffff28 (diff) | |
download | chromium_src-389f566a8d88ba4849dc1c2179e00bf64b1d1b39.zip chromium_src-389f566a8d88ba4849dc1c2179e00bf64b1d1b39.tar.gz chromium_src-389f566a8d88ba4849dc1c2179e00bf64b1d1b39.tar.bz2 |
Make use of InvalidationService
The InvalidationService was introduced r199520. That commit added the
InvalidationService interface and several implementations of it, but
made no use of the new code. This commit builds on that work.
Up until now, TICL invalidations were handled on the sync thread. The
related objects were instantiated and owned by the SyncBackendHost and
SyncManager. All requests to update the set of object registrations had
to be passed to the sync thread. Components that wanted to receive
invalidations but were not part of sync had to route their communication
with the invalidations server through ProfileSyncService to get to the
sync thread. Things were a bit different on Android, but the system
still tried to pretend that invalidations were owned by the sync thread.
The new InvalidationService implementation is a ProfileKeyedService that
is mostly independent from sync. It still relies on sync to manage sign
in and fetch the appropriate auth tokens. However, it's now much easier
for components outside of sync to communication with the invalidations
server.
The new system allows us to remove a lot of invalidations-related code
from the ProfileSyncService, SyncBackendHost and SyncManager. Sync is
now just one of many clients of the InvalidationService. The
SyncBackendHost is responsible for forwarding messages back and forth
between the InvalidationService and the sync thread.
TBR=sky,erg
BUG=124137
Review URL: https://chromiumcodereview.appspot.com/15580002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208315 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/sync_manager_impl.h')
-rw-r--r-- | sync/internal_api/sync_manager_impl.h | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h index c12eea7..153df81 100644 --- a/sync/internal_api/sync_manager_impl.h +++ b/sync/internal_api/sync_manager_impl.h @@ -51,7 +51,6 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : public SyncManager, public net::NetworkChangeNotifier::IPAddressObserver, public net::NetworkChangeNotifier::ConnectionTypeObserver, - public InvalidationHandler, public JsBackend, public SyncEngineEventListener, public ServerConnectionEventListener, @@ -74,7 +73,6 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : ExtensionsActivityMonitor* extensions_activity_monitor, SyncManager::ChangeDelegate* change_delegate, const SyncCredentials& credentials, - scoped_ptr<Invalidator> invalidator, const std::string& invalidator_client_id, const std::string& restored_key_for_bootstrapping, const std::string& restored_keystore_key_for_bootstrapping, @@ -90,17 +88,6 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : ModelTypeSet types) OVERRIDE; virtual bool PurgePartiallySyncedTypes() OVERRIDE; virtual void UpdateCredentials(const SyncCredentials& credentials) OVERRIDE; - virtual void UpdateEnabledTypes(ModelTypeSet enabled_types) OVERRIDE; - virtual void RegisterInvalidationHandler( - InvalidationHandler* handler) OVERRIDE; - virtual void UpdateRegisteredInvalidationIds( - InvalidationHandler* handler, - const ObjectIdSet& ids) OVERRIDE; - virtual void UnregisterInvalidationHandler( - InvalidationHandler* handler) OVERRIDE; - virtual void AcknowledgeInvalidation( - const invalidation::ObjectId& id, - const syncer::AckHandle& ack_handle) OVERRIDE; virtual void StartSyncingNormally( const ModelSafeRoutingInfo& routing_info) OVERRIDE; virtual void ConfigureSyncer( @@ -112,6 +99,9 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : const ModelSafeRoutingInfo& new_routing_info, const base::Closure& ready_task, const base::Closure& retry_task) OVERRIDE; + virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; + virtual void OnIncomingInvalidation( + const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; virtual void AddObserver(SyncManager::Observer* observer) OVERRIDE; virtual void RemoveObserver(SyncManager::Observer* observer) OVERRIDE; virtual SyncStatus GetDetailedStatus() const OVERRIDE; @@ -177,11 +167,6 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : syncable::BaseTransaction* trans, std::vector<int64>* entries_changed) OVERRIDE; - // InvalidationHandler implementation. - virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE; - virtual void OnIncomingInvalidation( - const ObjectIdInvalidationMap& invalidation_map) OVERRIDE; - // Handle explicit requests to fetch updates for the given types. virtual void RefreshTypes(ModelTypeSet types) OVERRIDE; @@ -336,9 +321,6 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : // Start()ed. scoped_ptr<SyncScheduler> scheduler_; - // The Invalidator which notifies us when updates need to be downloaded. - scoped_ptr<Invalidator> invalidator_; - // A multi-purpose status watch object that aggregates stats from various // sync components. AllStatus allstatus_; |