summaryrefslogtreecommitdiffstats
path: root/sync/notifier/fake_invalidator.cc
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-28 03:17:58 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-28 03:17:58 +0000
commita329cb82a4627bea79c0db5dabe09698ad83c27e (patch)
treeca12b48cef0de11d3058bee683e082281f5061ec /sync/notifier/fake_invalidator.cc
parent3c6babd32ae5b7e8125ac16ee4e686654bcf59d6 (diff)
downloadchromium_src-a329cb82a4627bea79c0db5dabe09698ad83c27e.zip
chromium_src-a329cb82a4627bea79c0db5dabe09698ad83c27e.tar.gz
chromium_src-a329cb82a4627bea79c0db5dabe09698ad83c27e.tar.bz2
Rename SyncNotifier->Invalidator and SyncNotifierObserver->InvalidationHandler.
This makes the naming more consistent with how the various classes and interfaces are used, since they are not sync-specific anymore. BUG=none TBR=sky Review URL: https://chromiumcodereview.appspot.com/10875064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153619 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/notifier/fake_invalidator.cc')
-rw-r--r--sync/notifier/fake_invalidator.cc73
1 files changed, 73 insertions, 0 deletions
diff --git a/sync/notifier/fake_invalidator.cc b/sync/notifier/fake_invalidator.cc
new file mode 100644
index 0000000..85696ad
--- /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