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 #include "sync/notifier/object_id_invalidation_map.h" |
| 8 |
7 namespace syncer { | 9 namespace syncer { |
8 | 10 |
9 FakeInvalidator::FakeInvalidator() {} | 11 FakeInvalidator::FakeInvalidator() {} |
10 | 12 |
11 FakeInvalidator::~FakeInvalidator() {} | 13 FakeInvalidator::~FakeInvalidator() {} |
12 | 14 |
13 bool FakeInvalidator::IsHandlerRegistered(InvalidationHandler* handler) const { | 15 bool FakeInvalidator::IsHandlerRegistered(InvalidationHandler* handler) const { |
14 return registrar_.IsHandlerRegisteredForTest(handler); | 16 return registrar_.IsHandlerRegisteredForTest(handler); |
15 } | 17 } |
16 | 18 |
(...skipping 25 matching lines...) Expand all Loading... |
42 | 44 |
43 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler, | 45 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler, |
44 const ObjectIdSet& ids) { | 46 const ObjectIdSet& ids) { |
45 registrar_.UpdateRegisteredIds(handler, ids); | 47 registrar_.UpdateRegisteredIds(handler, ids); |
46 } | 48 } |
47 | 49 |
48 void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) { | 50 void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) { |
49 registrar_.UnregisterHandler(handler); | 51 registrar_.UnregisterHandler(handler); |
50 } | 52 } |
51 | 53 |
52 void FakeInvalidator::Acknowledge(const invalidation::ObjectId& id, | |
53 const AckHandle& ack_handle) { | |
54 // Do nothing. | |
55 } | |
56 | |
57 InvalidatorState FakeInvalidator::GetInvalidatorState() const { | 54 InvalidatorState FakeInvalidator::GetInvalidatorState() const { |
58 return registrar_.GetInvalidatorState(); | 55 return registrar_.GetInvalidatorState(); |
59 } | 56 } |
60 | 57 |
61 void FakeInvalidator::UpdateCredentials( | 58 void FakeInvalidator::UpdateCredentials( |
62 const std::string& email, const std::string& token) { | 59 const std::string& email, const std::string& token) { |
63 email_ = email; | 60 email_ = email; |
64 token_ = token; | 61 token_ = token; |
65 } | 62 } |
66 | 63 |
67 } // namespace syncer | 64 } // namespace syncer |
OLD | NEW |