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

Unified Diff: sync/notifier/invalidator.h

Issue 10916131: [Invalidations] Add GetInvalidatorState() to Invalidator{,Frontend} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android Created 8 years, 3 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 | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidator_factory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/invalidator.h
diff --git a/sync/notifier/invalidator.h b/sync/notifier/invalidator.h
index de33f190cb2337d4a10f0540a71dae6bbda673f3..d5435bcd19bc3badf0315bd3112f352e58116b88 100644
--- a/sync/notifier/invalidator.h
+++ b/sync/notifier/invalidator.h
@@ -13,6 +13,7 @@
#include "sync/internal_api/public/base/model_type.h"
#include "sync/notifier/invalidation_util.h"
+#include "sync/notifier/invalidator_state.h"
#include "sync/notifier/object_id_state_map.h"
namespace syncer {
@@ -49,7 +50,7 @@ class Invalidator {
// invalidator->UnregisterHandler(client_handler);
// Starts sending notifications to |handler|. |handler| must not be NULL,
- // and it must already be registered.
+ // and it must not already be registered.
virtual void RegisterHandler(InvalidationHandler* handler) = 0;
// Updates the set of ObjectIds associated with |handler|. |handler| must
@@ -63,6 +64,11 @@ class Invalidator {
// associated with |handler|.
virtual void UnregisterHandler(InvalidationHandler* handler) = 0;
+ // Returns the current invalidator state. When called from within
+ // InvalidationHandler::OnInvalidatorStateChange(), this must return
+ // the updated state.
+ virtual InvalidatorState GetInvalidatorState() const = 0;
+
// SetUniqueId must be called once, before any call to
// UpdateCredentials. |unique_id| should be a non-empty globally
// unique string.
@@ -83,7 +89,7 @@ class Invalidator {
// which is still used by sync integration tests.
// TODO(akalin): Remove this once we move the integration tests off p2p
// notifications.
- virtual void SendNotification(const ObjectIdStateMap& id_state_map) = 0;
+ virtual void SendInvalidation(const ObjectIdStateMap& id_state_map) = 0;
};
} // namespace syncer
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidator_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698