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

Unified Diff: sync/notifier/fake_invalidation_handler.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_invalidation_handler.h ('k') | sync/notifier/fake_invalidator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/fake_invalidation_handler.cc
diff --git a/sync/notifier/fake_invalidation_handler.cc b/sync/notifier/fake_invalidation_handler.cc
index 6c065871a9ecd857797a1c97c39171510cf12aec..d63a549e5797b3a39e691d35988fce32403c9a49 100644
--- a/sync/notifier/fake_invalidation_handler.cc
+++ b/sync/notifier/fake_invalidation_handler.cc
@@ -7,46 +7,40 @@
namespace syncer {
FakeInvalidationHandler::FakeInvalidationHandler()
- : reason_(TRANSIENT_NOTIFICATION_ERROR),
- last_source_(LOCAL_NOTIFICATION),
- notification_count_(0) {}
+ : state_(DEFAULT_INVALIDATION_ERROR),
+ last_source_(LOCAL_INVALIDATION),
+ invalidation_count_(0) {}
FakeInvalidationHandler::~FakeInvalidationHandler() {}
-NotificationsDisabledReason
-FakeInvalidationHandler::GetNotificationsDisabledReason() const {
- return reason_;
+InvalidatorState FakeInvalidationHandler::GetInvalidatorState() const {
+ return state_;
}
const ObjectIdStateMap&
-FakeInvalidationHandler::GetLastNotificationIdStateMap() const {
+FakeInvalidationHandler::GetLastInvalidationIdStateMap() const {
return last_id_state_map_;
}
-IncomingNotificationSource
-FakeInvalidationHandler::GetLastNotificationSource() const {
+IncomingInvalidationSource
+FakeInvalidationHandler::GetLastInvalidationSource() const {
return last_source_;
}
-int FakeInvalidationHandler::GetNotificationCount() const {
- return notification_count_;
+int FakeInvalidationHandler::GetInvalidationCount() const {
+ return invalidation_count_;
}
-void FakeInvalidationHandler::OnNotificationsEnabled() {
- reason_ = NO_NOTIFICATION_ERROR;
+void FakeInvalidationHandler::OnInvalidatorStateChange(InvalidatorState state) {
+ state_ = state;
}
-void FakeInvalidationHandler::OnNotificationsDisabled(
- NotificationsDisabledReason reason) {
- reason_ = reason;
-}
-
-void FakeInvalidationHandler::OnIncomingNotification(
+void FakeInvalidationHandler::OnIncomingInvalidation(
const ObjectIdStateMap& id_state_map,
- IncomingNotificationSource source) {
+ IncomingInvalidationSource source) {
last_id_state_map_ = id_state_map;
last_source_ = source;
- ++notification_count_;
+ ++invalidation_count_;
}
} // namespace syncer
« no previous file with comments | « sync/notifier/fake_invalidation_handler.h ('k') | sync/notifier/fake_invalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698