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 "components/invalidation/fake_invalidation_state_tracker.h" | |
6 | |
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" | |
12 | |
13 namespace syncer { | |
14 | |
15 const int64 FakeInvalidationStateTracker::kMinVersion = kint64min; | |
16 | |
17 FakeInvalidationStateTracker::FakeInvalidationStateTracker() {} | |
18 | |
19 FakeInvalidationStateTracker::~FakeInvalidationStateTracker() {} | |
20 | |
21 void FakeInvalidationStateTracker::ClearAndSetNewClientId( | |
22 const std::string& client_id) { | |
23 Clear(); | |
24 invalidator_client_id_ = client_id; | |
25 } | |
26 | |
27 std::string FakeInvalidationStateTracker::GetInvalidatorClientId() const { | |
28 return invalidator_client_id_; | |
29 } | |
30 | |
31 void FakeInvalidationStateTracker::SetBootstrapData( | |
32 const std::string& data) { | |
33 bootstrap_data_ = data; | |
34 } | |
35 | |
36 std::string FakeInvalidationStateTracker::GetBootstrapData() const { | |
37 return bootstrap_data_; | |
38 } | |
39 | |
40 void FakeInvalidationStateTracker::SetSavedInvalidations( | |
41 const UnackedInvalidationsMap& states) { | |
42 unacked_invalidations_map_ = states; | |
43 } | |
44 | |
45 UnackedInvalidationsMap | |
46 FakeInvalidationStateTracker::GetSavedInvalidations() const { | |
47 return unacked_invalidations_map_; | |
48 } | |
49 | |
50 void FakeInvalidationStateTracker::Clear() { | |
51 invalidator_client_id_.clear(); | |
52 bootstrap_data_.clear(); | |
53 } | |
54 | |
55 } // namespace syncer | |
OLD | NEW |