OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "sync/notifier/fake_invalidator.h" |
| 6 |
| 7 namespace syncer { |
| 8 |
| 9 FakeInvalidator::FakeInvalidator() {} |
| 10 |
| 11 FakeInvalidator::~FakeInvalidator() {} |
| 12 |
| 13 bool FakeInvalidator::IsHandlerRegistered(InvalidationHandler* handler) const { |
| 14 return registrar_.IsHandlerRegisteredForTest(handler); |
| 15 } |
| 16 |
| 17 ObjectIdSet FakeInvalidator::GetRegisteredIds( |
| 18 InvalidationHandler* handler) const { |
| 19 return registrar_.GetRegisteredIdsForTest(handler); |
| 20 } |
| 21 |
| 22 void FakeInvalidator::RegisterHandler(InvalidationHandler* handler) { |
| 23 registrar_.RegisterHandler(handler); |
| 24 } |
| 25 |
| 26 const std::string& FakeInvalidator::GetUniqueId() const { |
| 27 return unique_id_; |
| 28 } |
| 29 |
| 30 const std::string& FakeInvalidator::GetStateDeprecated() const { |
| 31 return state_; |
| 32 } |
| 33 |
| 34 const std::string& FakeInvalidator::GetCredentialsEmail() const { |
| 35 return email_; |
| 36 } |
| 37 |
| 38 const std::string& FakeInvalidator::GetCredentialsToken() const { |
| 39 return token_; |
| 40 } |
| 41 |
| 42 ModelTypeSet FakeInvalidator::GetLastChangedTypes() const { |
| 43 return last_changed_types_; |
| 44 } |
| 45 |
| 46 void FakeInvalidator::UpdateRegisteredIds(InvalidationHandler* handler, |
| 47 const ObjectIdSet& ids) { |
| 48 registrar_.UpdateRegisteredIds(handler, ids); |
| 49 } |
| 50 |
| 51 void FakeInvalidator::UnregisterHandler(InvalidationHandler* handler) { |
| 52 registrar_.UnregisterHandler(handler); |
| 53 } |
| 54 |
| 55 void FakeInvalidator::SetUniqueId(const std::string& unique_id) { |
| 56 unique_id_ = unique_id; |
| 57 } |
| 58 |
| 59 void FakeInvalidator::SetStateDeprecated(const std::string& state) { |
| 60 state_ = state; |
| 61 } |
| 62 |
| 63 void FakeInvalidator::UpdateCredentials( |
| 64 const std::string& email, const std::string& token) { |
| 65 email_ = email; |
| 66 token_ = token; |
| 67 } |
| 68 |
| 69 void FakeInvalidator::SendNotification(ModelTypeSet changed_types) { |
| 70 last_changed_types_ = changed_types; |
| 71 } |
| 72 |
| 73 } // namespace syncer |
OLD | NEW |