Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: sync/notifier/fake_invalidation_state_tracker.cc

Issue 12094113: Migrate invalidator client IDs out of sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_client compile errors Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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/fake_invalidation_state_tracker.h" 5 #include "sync/notifier/fake_invalidation_state_tracker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/task_runner.h" 10 #include "base/task_runner.h"
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 state_map_[id].version = max_version; 41 state_map_[id].version = max_version;
42 } 42 }
43 43
44 void FakeInvalidationStateTracker::Forget(const ObjectIdSet& ids) { 44 void FakeInvalidationStateTracker::Forget(const ObjectIdSet& ids) {
45 for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) { 45 for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) {
46 state_map_.erase(*it); 46 state_map_.erase(*it);
47 } 47 }
48 } 48 }
49 49
50 void FakeInvalidationStateTracker::SetInvalidatorClientId(
51 const std::string& client_id) {
52 invalidator_client_id_ = client_id;
53 }
54
55 std::string FakeInvalidationStateTracker::GetInvalidatorClientId() const {
56 return invalidator_client_id_;
57 }
58
50 void FakeInvalidationStateTracker::SetBootstrapData( 59 void FakeInvalidationStateTracker::SetBootstrapData(
51 const std::string& data) { 60 const std::string& data) {
52 bootstrap_data_ = data; 61 bootstrap_data_ = data;
53 } 62 }
54 63
55 std::string FakeInvalidationStateTracker::GetBootstrapData() const { 64 std::string FakeInvalidationStateTracker::GetBootstrapData() const {
56 return bootstrap_data_; 65 return bootstrap_data_;
57 } 66 }
58 67
59 void FakeInvalidationStateTracker::GenerateAckHandles( 68 void FakeInvalidationStateTracker::GenerateAckHandles(
(...skipping 11 matching lines...) Expand all
71 80
72 void FakeInvalidationStateTracker::Acknowledge(const invalidation::ObjectId& id, 81 void FakeInvalidationStateTracker::Acknowledge(const invalidation::ObjectId& id,
73 const AckHandle& ack_handle) { 82 const AckHandle& ack_handle) {
74 InvalidationStateMap::iterator it = state_map_.find(id); 83 InvalidationStateMap::iterator it = state_map_.find(id);
75 if (it == state_map_.end()) 84 if (it == state_map_.end())
76 ADD_FAILURE(); 85 ADD_FAILURE();
77 it->second.current = ack_handle; 86 it->second.current = ack_handle;
78 } 87 }
79 88
80 } // namespace syncer 89 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/notifier/fake_invalidation_state_tracker.h ('k') | sync/notifier/invalidation_state_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698