Roll src/third_party/WebKit 44e0d7b:d79e3c1 (svn 190013:190016)
[chromium-blink-merge.git] / components / invalidation / fake_invalidation_state_tracker.cc
blob6dda92928b28a08d4fd15c022d7a19a66dcf49c6
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/fake_invalidation_state_tracker.h"
7 #include "base/bind.h"
8 #include "base/callback.h"
9 #include "base/location.h"
10 #include "base/task_runner.h"
11 #include "testing/gtest/include/gtest/gtest.h"
13 namespace syncer {
15 const int64 FakeInvalidationStateTracker::kMinVersion = kint64min;
17 FakeInvalidationStateTracker::FakeInvalidationStateTracker() {}
19 FakeInvalidationStateTracker::~FakeInvalidationStateTracker() {}
21 void FakeInvalidationStateTracker::ClearAndSetNewClientId(
22 const std::string& client_id) {
23 Clear();
24 invalidator_client_id_ = client_id;
27 std::string FakeInvalidationStateTracker::GetInvalidatorClientId() const {
28 return invalidator_client_id_;
31 void FakeInvalidationStateTracker::SetBootstrapData(
32 const std::string& data) {
33 bootstrap_data_ = data;
36 std::string FakeInvalidationStateTracker::GetBootstrapData() const {
37 return bootstrap_data_;
40 void FakeInvalidationStateTracker::SetSavedInvalidations(
41 const UnackedInvalidationsMap& states) {
42 unacked_invalidations_map_ = states;
45 UnackedInvalidationsMap
46 FakeInvalidationStateTracker::GetSavedInvalidations() const {
47 return unacked_invalidations_map_;
50 void FakeInvalidationStateTracker::Clear() {
51 invalidator_client_id_.clear();
52 bootstrap_data_.clear();
55 } // namespace syncer