diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-05 03:51:44 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-05 03:51:44 +0000 |
commit | ce2e906005c7d6664518ff9b1e541733ed251ace (patch) | |
tree | f34377f83975fcc5d289491ba7d2828eebedf52b /sync/internal_api/public | |
parent | b86d3ec7994792d30c1a54d8b25579ad8eded24f (diff) | |
download | chromium_src-ce2e906005c7d6664518ff9b1e541733ed251ace.zip chromium_src-ce2e906005c7d6664518ff9b1e541733ed251ace.tar.gz chromium_src-ce2e906005c7d6664518ff9b1e541733ed251ace.tar.bz2 |
Implement Invalidator::Acknowledge.
We implement this by creating a local queue of entries we've received invalidations for and then immediately acknowledging to Tango. When InvalidationHandlers acknowledge that they've finished processing for an id, we erase their entry from the queue; otherwise, we send reminder invalidations on an exponentially increasing delay.
BUG=124149
Review URL: https://chromiumcodereview.appspot.com/10911084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public')
-rw-r--r-- | sync/internal_api/public/sync_manager.h | 5 | ||||
-rw-r--r-- | sync/internal_api/public/test/fake_sync_manager.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h index 6e23ba8..acd5394 100644 --- a/sync/internal_api/public/sync_manager.h +++ b/sync/internal_api/public/sync_manager.h @@ -354,6 +354,11 @@ class SYNC_EXPORT SyncManager { virtual void UnregisterInvalidationHandler( InvalidationHandler* handler) = 0; + // Forwards to the underlying notifier (see comments in invalidator.h). + virtual void AcknowledgeInvalidation( + const invalidation::ObjectId& id, + const syncer::AckHandle& ack_handle) = 0; + // Put the syncer in normal mode ready to perform nudges and polls. virtual void StartSyncingNormally( const ModelSafeRoutingInfo& routing_info) = 0; diff --git a/sync/internal_api/public/test/fake_sync_manager.h b/sync/internal_api/public/test/fake_sync_manager.h index 49c443f..2d0f9de 100644 --- a/sync/internal_api/public/test/fake_sync_manager.h +++ b/sync/internal_api/public/test/fake_sync_manager.h @@ -102,6 +102,9 @@ class FakeSyncManager : public SyncManager { 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( |