| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 const ObjectIdInvalidationMap& invalidation_map, | 48 const ObjectIdInvalidationMap& invalidation_map, |
| 49 IncomingInvalidationSource source) { | 49 IncomingInvalidationSource source) { |
| 50 registrar_.DispatchInvalidationsToHandlers(invalidation_map, source); | 50 registrar_.DispatchInvalidationsToHandlers(invalidation_map, source); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) { | 53 void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) { |
| 54 registrar_.RegisterHandler(handler); | 54 registrar_.RegisterHandler(handler); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler, | 57 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler, |
| 58 const ObjectIdSet& ids) { | 58 const ObjectIdSet& ids) { |
| 59 registrar_.UpdateRegisteredIds(handler, ids); | 59 registrar_.UpdateRegisteredIds(handler, ids); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) { | 62 void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) { |
| 63 registrar_.UnregisterHandler(handler); | 63 registrar_.UnregisterHandler(handler); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void FakeInvalidator::Acknowledge(const invalidation::ObjectId& id, |
| 67 const AckHandle& ack_handle) { |
| 68 } |
| 69 |
| 66 InvalidatorState FakeInvalidator::GetInvalidatorState() const { | 70 InvalidatorState FakeInvalidator::GetInvalidatorState() const { |
| 67 return registrar_.GetInvalidatorState(); | 71 return registrar_.GetInvalidatorState(); |
| 68 } | 72 } |
| 69 | 73 |
| 70 void FakeInvalidator::SetUniqueId(const std::string& unique_id) { | 74 void FakeInvalidator::SetUniqueId(const std::string& unique_id) { |
| 71 unique_id_ = unique_id; | 75 unique_id_ = unique_id; |
| 72 } | 76 } |
| 73 | 77 |
| 74 void FakeInvalidator::SetStateDeprecated(const std::string& state) { | 78 void FakeInvalidator::SetStateDeprecated(const std::string& state) { |
| 75 state_ = state; | 79 state_ = state; |
| 76 } | 80 } |
| 77 | 81 |
| 78 void FakeInvalidator::UpdateCredentials( | 82 void FakeInvalidator::UpdateCredentials( |
| 79 const std::string& email, const std::string& token) { | 83 const std::string& email, const std::string& token) { |
| 80 email_ = email; | 84 email_ = email; |
| 81 token_ = token; | 85 token_ = token; |
| 82 } | 86 } |
| 83 | 87 |
| 84 void FakeInvalidator::SendInvalidation( | 88 void FakeInvalidator::SendInvalidation( |
| 85 const ObjectIdInvalidationMap& invalidation_map) { | 89 const ObjectIdInvalidationMap& invalidation_map) { |
| 86 last_sent_invalidation_map_ = invalidation_map; | 90 last_sent_invalidation_map_ = invalidation_map; |
| 87 } | 91 } |
| 88 | 92 |
| 89 } // namespace syncer | 93 } // namespace syncer |
| OLD | NEW |