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/fake_invalidation_state_tracker.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"
15 const int64
FakeInvalidationStateTracker::kMinVersion
= kint64min
;
17 FakeInvalidationStateTracker::FakeInvalidationStateTracker() {}
19 FakeInvalidationStateTracker::~FakeInvalidationStateTracker() {}
21 void FakeInvalidationStateTracker::ClearAndSetNewClientId(
22 const std::string
& client_id
) {
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();