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

Unified Diff: sync/notifier/invalidation_handler.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/fake_invalidator_unittest.cc ('k') | sync/notifier/invalidation_notifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/invalidation_handler.h
diff --git a/sync/notifier/invalidation_handler.h b/sync/notifier/invalidation_handler.h
index c1252ac17f879ec57858490c0b583348f076f2bf..58f3a53943188d25197f716108b23ac7f0783208 100644
--- a/sync/notifier/invalidation_handler.h
+++ b/sync/notifier/invalidation_handler.h
@@ -5,33 +5,29 @@
#ifndef SYNC_NOTIFIER_INVALIDATION_HANDLER_H_
#define SYNC_NOTIFIER_INVALIDATION_HANDLER_H_
+#include "sync/notifier/invalidator_state.h"
#include "sync/notifier/object_id_state_map.h"
-#include "sync/notifier/notifications_disabled_reason.h"
namespace syncer {
-enum IncomingNotificationSource {
- // The server is notifying us that one or more datatypes have stale data.
- REMOTE_NOTIFICATION,
- // A chrome datatype is requesting an optimistic refresh of its data.
- LOCAL_NOTIFICATION,
+enum IncomingInvalidationSource {
+ // The server is notifying us that one or more objects have stale data.
+ REMOTE_INVALIDATION,
+ // Something locally is requesting an optimistic refresh of its data.
+ LOCAL_INVALIDATION,
};
class InvalidationHandler {
public:
- // Called when notifications are enabled.
- virtual void OnNotificationsEnabled() = 0;
+ // Called when the invalidator state changes.
+ virtual void OnInvalidatorStateChange(InvalidatorState state) = 0;
- // Called when notifications are disabled, with the reason in
- // |reason|.
- virtual void OnNotificationsDisabled(
- NotificationsDisabledReason reason) = 0;
-
- // Called when a notification is received. The per-id states
- // are in |id_state_map| and the source is in |source|.
- virtual void OnIncomingNotification(
+ // Called when a invalidation is received. The per-id states are in
+ // |id_state_map| and the source is in |source|. Note that this may be
+ // called regardless of the current invalidator state.
+ virtual void OnIncomingInvalidation(
const ObjectIdStateMap& id_state_map,
- IncomingNotificationSource source) = 0;
+ IncomingInvalidationSource source) = 0;
protected:
virtual ~InvalidationHandler() {}
« no previous file with comments | « sync/notifier/fake_invalidator_unittest.cc ('k') | sync/notifier/invalidation_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698