| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/invalidator_test_template.h" | 5 #include "components/invalidation/invalidator_test_template.h" |
| 6 | 6 |
| 7 namespace syncer { | 7 namespace syncer { |
| 8 namespace internal { | 8 namespace internal { |
| 9 | 9 |
| 10 BoundFakeInvalidationHandler::BoundFakeInvalidationHandler( | 10 BoundFakeInvalidationHandler::BoundFakeInvalidationHandler( |
| 11 const Invalidator& invalidator) | 11 const Invalidator& invalidator) |
| 12 : invalidator_(invalidator), | 12 : invalidator_(invalidator), |
| 13 last_retrieved_state_(DEFAULT_INVALIDATION_ERROR) {} | 13 last_retrieved_state_(DEFAULT_INVALIDATION_ERROR) {} |
| 14 | 14 |
| 15 BoundFakeInvalidationHandler::~BoundFakeInvalidationHandler() {} | 15 BoundFakeInvalidationHandler::~BoundFakeInvalidationHandler() {} |
| 16 | 16 |
| 17 InvalidatorState BoundFakeInvalidationHandler::GetLastRetrievedState() const { | 17 InvalidatorState BoundFakeInvalidationHandler::GetLastRetrievedState() const { |
| 18 return last_retrieved_state_; | 18 return last_retrieved_state_; |
| 19 } | 19 } |
| 20 | 20 |
| 21 void BoundFakeInvalidationHandler::OnInvalidatorStateChange( | 21 void BoundFakeInvalidationHandler::OnInvalidatorStateChange( |
| 22 InvalidatorState state) { | 22 InvalidatorState state) { |
| 23 FakeInvalidationHandler::OnInvalidatorStateChange(state); | 23 FakeInvalidationHandler::OnInvalidatorStateChange(state); |
| 24 last_retrieved_state_ = invalidator_.GetInvalidatorState(); | 24 last_retrieved_state_ = invalidator_.GetInvalidatorState(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 } // namespace internal | 27 } // namespace internal |
| 28 } // namespace syncer | 28 } // namespace syncer |
| OLD | NEW |