OLD | NEW |
---|---|
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 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 void FakeInvalidator::EmitOnIncomingInvalidation( | 43 void FakeInvalidator::EmitOnIncomingInvalidation( |
44 const ObjectIdInvalidationMap& invalidation_map) { | 44 const ObjectIdInvalidationMap& invalidation_map) { |
45 registrar_.DispatchInvalidationsToHandlers(invalidation_map); | 45 registrar_.DispatchInvalidationsToHandlers(invalidation_map); |
46 } | 46 } |
47 | 47 |
48 void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) { | 48 void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) { |
49 registrar_.RegisterHandler(handler); | 49 registrar_.RegisterHandler(handler); |
50 } | 50 } |
51 | 51 |
52 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler, | 52 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler, |
53 const ObjectIdSet& ids) { | 53 const ObjectIdSet& ids) { |
54 registrar_.UpdateRegisteredIds(handler, ids); | 54 registrar_.UpdateRegisteredIds(handler, ids); |
55 } | 55 } |
56 | 56 |
57 void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) { | 57 void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) { |
58 registrar_.UnregisterHandler(handler); | 58 registrar_.UnregisterHandler(handler); |
59 } | 59 } |
60 | 60 |
61 void FakeInvalidator::Acknowledge(const invalidation::ObjectId& id, | |
62 const AckHandle& ack_handle) { | |
akalin
2013/02/15 22:32:12
// Do nothing.
dcheng
2013/02/22 02:51:30
Done.
| |
63 } | |
64 | |
61 InvalidatorState FakeInvalidator::GetInvalidatorState() const { | 65 InvalidatorState FakeInvalidator::GetInvalidatorState() const { |
62 return registrar_.GetInvalidatorState(); | 66 return registrar_.GetInvalidatorState(); |
63 } | 67 } |
64 | 68 |
65 void FakeInvalidator::SetUniqueId(const std::string& unique_id) { | 69 void FakeInvalidator::SetUniqueId(const std::string& unique_id) { |
66 unique_id_ = unique_id; | 70 unique_id_ = unique_id; |
67 } | 71 } |
68 | 72 |
69 void FakeInvalidator::UpdateCredentials( | 73 void FakeInvalidator::UpdateCredentials( |
70 const std::string& email, const std::string& token) { | 74 const std::string& email, const std::string& token) { |
71 email_ = email; | 75 email_ = email; |
72 token_ = token; | 76 token_ = token; |
73 } | 77 } |
74 | 78 |
75 void FakeInvalidator::SendInvalidation( | 79 void FakeInvalidator::SendInvalidation( |
76 const ObjectIdInvalidationMap& invalidation_map) { | 80 const ObjectIdInvalidationMap& invalidation_map) { |
77 last_sent_invalidation_map_ = invalidation_map; | 81 last_sent_invalidation_map_ = invalidation_map; |
78 } | 82 } |
79 | 83 |
80 } // namespace syncer | 84 } // namespace syncer |
OLD | NEW |