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

Side by Side Diff: sync/notifier/fake_invalidator.cc

Issue 12847003: Separate invalidator and sync client ID (part 2/2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_listen_notifications utility Created 7 years, 9 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
« no previous file with comments | « sync/notifier/fake_invalidator.h ('k') | sync/notifier/fake_invalidator_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/notifier/fake_invalidator.h" 5 #include "sync/notifier/fake_invalidator.h"
6 6
7 namespace syncer { 7 namespace syncer {
8 8
9 FakeInvalidator::FakeInvalidator() {} 9 FakeInvalidator::FakeInvalidator() {}
10 10
11 FakeInvalidator::~FakeInvalidator() {} 11 FakeInvalidator::~FakeInvalidator() {}
12 12
13 bool FakeInvalidator::IsHandlerRegistered(InvalidationHandler* handler) const { 13 bool FakeInvalidator::IsHandlerRegistered(InvalidationHandler* handler) const {
14 return registrar_.IsHandlerRegisteredForTest(handler); 14 return registrar_.IsHandlerRegisteredForTest(handler);
15 } 15 }
16 16
17 ObjectIdSet FakeInvalidator::GetRegisteredIds( 17 ObjectIdSet FakeInvalidator::GetRegisteredIds(
18 InvalidationHandler* handler) const { 18 InvalidationHandler* handler) const {
19 return registrar_.GetRegisteredIds(handler); 19 return registrar_.GetRegisteredIds(handler);
20 } 20 }
21 21
22 const std::string& FakeInvalidator::GetUniqueId() const {
23 return unique_id_;
24 }
25
26 const std::string& FakeInvalidator::GetCredentialsEmail() const { 22 const std::string& FakeInvalidator::GetCredentialsEmail() const {
27 return email_; 23 return email_;
28 } 24 }
29 25
30 const std::string& FakeInvalidator::GetCredentialsToken() const { 26 const std::string& FakeInvalidator::GetCredentialsToken() const {
31 return token_; 27 return token_;
32 } 28 }
33 29
34 const ObjectIdInvalidationMap& 30 const ObjectIdInvalidationMap&
35 FakeInvalidator::GetLastSentInvalidationMap() const { 31 FakeInvalidator::GetLastSentInvalidationMap() const {
(...skipping 24 matching lines...) Expand all
60 56
61 void FakeInvalidator::Acknowledge(const invalidation::ObjectId& id, 57 void FakeInvalidator::Acknowledge(const invalidation::ObjectId& id,
62 const AckHandle& ack_handle) { 58 const AckHandle& ack_handle) {
63 // Do nothing. 59 // Do nothing.
64 } 60 }
65 61
66 InvalidatorState FakeInvalidator::GetInvalidatorState() const { 62 InvalidatorState FakeInvalidator::GetInvalidatorState() const {
67 return registrar_.GetInvalidatorState(); 63 return registrar_.GetInvalidatorState();
68 } 64 }
69 65
70 void FakeInvalidator::SetUniqueId(const std::string& unique_id) {
71 unique_id_ = unique_id;
72 }
73
74 void FakeInvalidator::UpdateCredentials( 66 void FakeInvalidator::UpdateCredentials(
75 const std::string& email, const std::string& token) { 67 const std::string& email, const std::string& token) {
76 email_ = email; 68 email_ = email;
77 token_ = token; 69 token_ = token;
78 } 70 }
79 71
80 void FakeInvalidator::SendInvalidation( 72 void FakeInvalidator::SendInvalidation(
81 const ObjectIdInvalidationMap& invalidation_map) { 73 const ObjectIdInvalidationMap& invalidation_map) {
82 last_sent_invalidation_map_ = invalidation_map; 74 last_sent_invalidation_map_ = invalidation_map;
83 } 75 }
84 76
85 } // namespace syncer 77 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/notifier/fake_invalidator.h ('k') | sync/notifier/fake_invalidator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698