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) { |
| 63 // Do nothing. |
| 64 } |
| 65 |
61 InvalidatorState FakeInvalidator::GetInvalidatorState() const { | 66 InvalidatorState FakeInvalidator::GetInvalidatorState() const { |
62 return registrar_.GetInvalidatorState(); | 67 return registrar_.GetInvalidatorState(); |
63 } | 68 } |
64 | 69 |
65 void FakeInvalidator::SetUniqueId(const std::string& unique_id) { | 70 void FakeInvalidator::SetUniqueId(const std::string& unique_id) { |
66 unique_id_ = unique_id; | 71 unique_id_ = unique_id; |
67 } | 72 } |
68 | 73 |
69 void FakeInvalidator::UpdateCredentials( | 74 void FakeInvalidator::UpdateCredentials( |
70 const std::string& email, const std::string& token) { | 75 const std::string& email, const std::string& token) { |
71 email_ = email; | 76 email_ = email; |
72 token_ = token; | 77 token_ = token; |
73 } | 78 } |
74 | 79 |
75 void FakeInvalidator::SendInvalidation( | 80 void FakeInvalidator::SendInvalidation( |
76 const ObjectIdInvalidationMap& invalidation_map) { | 81 const ObjectIdInvalidationMap& invalidation_map) { |
77 last_sent_invalidation_map_ = invalidation_map; | 82 last_sent_invalidation_map_ = invalidation_map; |
78 } | 83 } |
79 | 84 |
80 } // namespace syncer | 85 } // namespace syncer |
OLD | NEW |