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 23 matching lines...) Expand all Loading... |
34 const ObjectIdInvalidationMap& | 34 const ObjectIdInvalidationMap& |
35 FakeInvalidator::GetLastSentInvalidationMap() const { | 35 FakeInvalidator::GetLastSentInvalidationMap() const { |
36 return last_sent_invalidation_map_; | 36 return last_sent_invalidation_map_; |
37 } | 37 } |
38 | 38 |
39 void FakeInvalidator::EmitOnInvalidatorStateChange(InvalidatorState state) { | 39 void FakeInvalidator::EmitOnInvalidatorStateChange(InvalidatorState state) { |
40 registrar_.UpdateInvalidatorState(state); | 40 registrar_.UpdateInvalidatorState(state); |
41 } | 41 } |
42 | 42 |
43 void FakeInvalidator::EmitOnIncomingInvalidation( | 43 void FakeInvalidator::EmitOnIncomingInvalidation( |
44 const ObjectIdInvalidationMap& invalidation_map, | 44 const ObjectIdInvalidationMap& invalidation_map) { |
45 IncomingInvalidationSource source) { | 45 registrar_.DispatchInvalidationsToHandlers(invalidation_map); |
46 registrar_.DispatchInvalidationsToHandlers(invalidation_map, source); | |
47 } | 46 } |
48 | 47 |
49 void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) { | 48 void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) { |
50 registrar_.RegisterHandler(handler); | 49 registrar_.RegisterHandler(handler); |
51 } | 50 } |
52 | 51 |
53 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler, | 52 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler, |
54 const ObjectIdSet& ids) { | 53 const ObjectIdSet& ids) { |
55 registrar_.UpdateRegisteredIds(handler, ids); | 54 registrar_.UpdateRegisteredIds(handler, ids); |
56 } | 55 } |
(...skipping 15 matching lines...) Expand all Loading... |
72 email_ = email; | 71 email_ = email; |
73 token_ = token; | 72 token_ = token; |
74 } | 73 } |
75 | 74 |
76 void FakeInvalidator::SendInvalidation( | 75 void FakeInvalidator::SendInvalidation( |
77 const ObjectIdInvalidationMap& invalidation_map) { | 76 const ObjectIdInvalidationMap& invalidation_map) { |
78 last_sent_invalidation_map_ = invalidation_map; | 77 last_sent_invalidation_map_ = invalidation_map; |
79 } | 78 } |
80 | 79 |
81 } // namespace syncer | 80 } // namespace syncer |
OLD | NEW |