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

Unified Diff: sync/notifier/fake_invalidator.cc

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.h ('k') | sync/notifier/fake_invalidator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/fake_invalidator.cc
diff --git a/sync/notifier/fake_invalidator.cc b/sync/notifier/fake_invalidator.cc
index 7468dae06cf78c686caada0ac9e0619a07e5eef6..c2b71350e03c9f4e491bcee2acb31f6364c69566 100644
--- a/sync/notifier/fake_invalidator.cc
+++ b/sync/notifier/fake_invalidator.cc
@@ -39,21 +39,16 @@ const ObjectIdStateMap& FakeInvalidator::GetLastSentIdStateMap() const {
return last_sent_id_state_map_;
}
-void FakeInvalidator::EmitOnNotificationsEnabled() {
- registrar_.EmitOnNotificationsEnabled();
+void FakeInvalidator::EmitOnInvalidatorStateChange(InvalidatorState state) {
+ registrar_.UpdateInvalidatorState(state);
}
-void FakeInvalidator::EmitOnIncomingNotification(
+void FakeInvalidator::EmitOnIncomingInvalidation(
const ObjectIdStateMap& id_state_map,
- IncomingNotificationSource source) {
+ IncomingInvalidationSource source) {
registrar_.DispatchInvalidationsToHandlers(id_state_map, source);
}
-void FakeInvalidator::EmitOnNotificationsDisabled(
- NotificationsDisabledReason reason) {
- registrar_.EmitOnNotificationsDisabled(reason);
-}
-
void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) {
registrar_.RegisterHandler(handler);
}
@@ -67,6 +62,10 @@ void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) {
registrar_.UnregisterHandler(handler);
}
+InvalidatorState FakeInvalidator::GetInvalidatorState() const {
+ return registrar_.GetInvalidatorState();
+}
+
void FakeInvalidator::SetUniqueId(const std::string& unique_id) {
unique_id_ = unique_id;
}
@@ -81,7 +80,7 @@ void FakeInvalidator::UpdateCredentials(
token_ = token;
}
-void FakeInvalidator::SendNotification(const ObjectIdStateMap& id_state_map) {
+void FakeInvalidator::SendInvalidation(const ObjectIdStateMap& id_state_map) {
last_sent_id_state_map_ = id_state_map;
}
« no previous file with comments | « sync/notifier/fake_invalidator.h ('k') | sync/notifier/fake_invalidator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698