Index: sync/notifier/invalidation_notifier.cc |
diff --git a/sync/notifier/invalidation_notifier.cc b/sync/notifier/invalidation_notifier.cc |
index 167b0bafe06aafc8bfa5fa0edc1d1af6f923c17c..b7ce56224623023e8adb78fed42972fadcc22817 100644 |
--- a/sync/notifier/invalidation_notifier.cc |
+++ b/sync/notifier/invalidation_notifier.cc |
@@ -52,6 +52,11 @@ void InvalidationNotifier::UnregisterHandler(InvalidationHandler* handler) { |
registrar_.UnregisterHandler(handler); |
} |
+InvalidatorState InvalidationNotifier::GetInvalidatorState() const { |
+ DCHECK(CalledOnValidThread()); |
+ return registrar_.GetInvalidatorState(); |
+} |
+ |
void InvalidationNotifier::SetUniqueId(const std::string& unique_id) { |
DCHECK(CalledOnValidThread()); |
invalidation_client_id_ = unique_id; |
@@ -94,7 +99,7 @@ void InvalidationNotifier::UpdateCredentials( |
invalidation_client_.UpdateCredentials(email, token); |
} |
-void InvalidationNotifier::SendNotification( |
+void InvalidationNotifier::SendInvalidation( |
const ObjectIdStateMap& id_state_map) { |
DCHECK(CalledOnValidThread()); |
// Do nothing. |
@@ -102,18 +107,12 @@ void InvalidationNotifier::SendNotification( |
void InvalidationNotifier::OnInvalidate(const ObjectIdStateMap& id_state_map) { |
DCHECK(CalledOnValidThread()); |
- registrar_.DispatchInvalidationsToHandlers(id_state_map, REMOTE_NOTIFICATION); |
-} |
- |
-void InvalidationNotifier::OnNotificationsEnabled() { |
- DCHECK(CalledOnValidThread()); |
- registrar_.EmitOnNotificationsEnabled(); |
+ registrar_.DispatchInvalidationsToHandlers(id_state_map, REMOTE_INVALIDATION); |
} |
-void InvalidationNotifier::OnNotificationsDisabled( |
- NotificationsDisabledReason reason) { |
+void InvalidationNotifier::OnInvalidatorStateChange(InvalidatorState state) { |
DCHECK(CalledOnValidThread()); |
- registrar_.EmitOnNotificationsDisabled(reason); |
+ registrar_.UpdateInvalidatorState(state); |
} |
} // namespace syncer |