Roll src/third_party/WebKit 9f7fb92:f103b33 (svn 202621:202622)
[chromium-blink-merge.git] / components / invalidation / impl / invalidator_test_template.cc
blob46d0960d9016ed2f2f2dd9fcc057d5c7c320a1a1
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
3 // found in the LICENSE file.
5 #include "components/invalidation/impl/invalidator_test_template.h"
7 namespace syncer {
8 namespace internal {
10 BoundFakeInvalidationHandler::BoundFakeInvalidationHandler(
11 const Invalidator& invalidator)
12 : invalidator_(invalidator),
13 last_retrieved_state_(DEFAULT_INVALIDATION_ERROR) {}
15 BoundFakeInvalidationHandler::~BoundFakeInvalidationHandler() {}
17 InvalidatorState BoundFakeInvalidationHandler::GetLastRetrievedState() const {
18 return last_retrieved_state_;
21 void BoundFakeInvalidationHandler::OnInvalidatorStateChange(
22 InvalidatorState state) {
23 FakeInvalidationHandler::OnInvalidatorStateChange(state);
24 last_retrieved_state_ = invalidator_.GetInvalidatorState();
27 } // namespace internal
28 } // namespace syncer