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

Unified Diff: sync/notifier/fake_invalidator.cc

Issue 10875064: Rename SyncNotifier->Invalidator and SyncNotifierObserver->InvalidationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_client target Created 8 years, 4 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
Index: sync/notifier/fake_invalidator.cc
diff --git a/sync/notifier/fake_invalidator.cc b/sync/notifier/fake_invalidator.cc
new file mode 100644
index 0000000000000000000000000000000000000000..85696ad4d64baf8ddd286cbabc702432d1e4e330
--- /dev/null
+++ b/sync/notifier/fake_invalidator.cc
@@ -0,0 +1,73 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "sync/notifier/fake_invalidator.h"
+
+namespace syncer {
+
+FakeInvalidator::FakeInvalidator() {}
+
+FakeInvalidator::~FakeInvalidator() {}
+
+bool FakeInvalidator::IsHandlerRegistered(InvalidationHandler* handler) const {
+ return registrar_.IsHandlerRegisteredForTest(handler);
+}
+
+ObjectIdSet FakeInvalidator::GetRegisteredIds(
+ InvalidationHandler* handler) const {
+ return registrar_.GetRegisteredIdsForTest(handler);
+}
+
+void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) {
+ registrar_.RegisterHandler(handler);
+}
+
+const std::string& FakeInvalidator::GetUniqueId() const {
+ return unique_id_;
+}
+
+const std::string& FakeInvalidator::GetStateDeprecated() const {
+ return state_;
+}
+
+const std::string& FakeInvalidator::GetCredentialsEmail() const {
+ return email_;
+}
+
+const std::string& FakeInvalidator::GetCredentialsToken() const {
+ return token_;
+}
+
+ModelTypeSet FakeInvalidator::GetLastChangedTypes() const {
+ return last_changed_types_;
+}
+
+void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler,
+ const ObjectIdSet& ids) {
+ registrar_.UpdateRegisteredIds(handler, ids);
+}
+
+void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) {
+ registrar_.UnregisterHandler(handler);
+}
+
+void FakeInvalidator::SetUniqueId(const std::string& unique_id) {
+ unique_id_ = unique_id;
+}
+
+void FakeInvalidator::SetStateDeprecated(const std::string& state) {
+ state_ = state;
+}
+
+void FakeInvalidator::UpdateCredentials(
+ const std::string& email, const std::string& token) {
+ email_ = email;
+ token_ = token;
+}
+
+void FakeInvalidator::SendNotification(ModelTypeSet changed_types) {
+ last_changed_types_ = changed_types;
+}
+
+} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698