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

Side by Side 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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "sync/notifier/fake_invalidator.h"
6
7 namespace syncer {
8
9 FakeInvalidator::FakeInvalidator() {}
10
11 FakeInvalidator::~FakeInvalidator() {}
12
13 bool FakeInvalidator::IsHandlerRegistered(InvalidationHandler* handler) const {
14 return registrar_.IsHandlerRegisteredForTest(handler);
15 }
16
17 ObjectIdSet FakeInvalidator::GetRegisteredIds(
18 InvalidationHandler* handler) const {
19 return registrar_.GetRegisteredIdsForTest(handler);
20 }
21
22 void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) {
23 registrar_.RegisterHandler(handler);
24 }
25
26 const std::string& FakeInvalidator::GetUniqueId() const {
27 return unique_id_;
28 }
29
30 const std::string& FakeInvalidator::GetStateDeprecated() const {
31 return state_;
32 }
33
34 const std::string& FakeInvalidator::GetCredentialsEmail() const {
35 return email_;
36 }
37
38 const std::string& FakeInvalidator::GetCredentialsToken() const {
39 return token_;
40 }
41
42 ModelTypeSet FakeInvalidator::GetLastChangedTypes() const {
43 return last_changed_types_;
44 }
45
46 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler,
47 const ObjectIdSet& ids) {
48 registrar_.UpdateRegisteredIds(handler, ids);
49 }
50
51 void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) {
52 registrar_.UnregisterHandler(handler);
53 }
54
55 void FakeInvalidator::SetUniqueId(const std::string& unique_id) {
56 unique_id_ = unique_id;
57 }
58
59 void FakeInvalidator::SetStateDeprecated(const std::string& state) {
60 state_ = state;
61 }
62
63 void FakeInvalidator::UpdateCredentials(
64 const std::string& email, const std::string& token) {
65 email_ = email;
66 token_ = token;
67 }
68
69 void FakeInvalidator::SendNotification(ModelTypeSet changed_types) {
70 last_changed_types_ = changed_types;
71 }
72
73 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698