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

Side by Side Diff: sync/tools/null_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
« no previous file with comments | « sync/tools/null_invalidation_state_tracker.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/tools/null_invalidation_state_tracker.h" 5 #include "sync/tools/null_invalidation_state_tracker.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 19 matching lines...) Expand all
30 << ObjectIdToString(id) << " to " << max_invalidation_version 30 << ObjectIdToString(id) << " to " << max_invalidation_version
31 << " with payload " << payload; 31 << " with payload " << payload;
32 } 32 }
33 33
34 void NullInvalidationStateTracker::Forget(const ObjectIdSet& ids) { 34 void NullInvalidationStateTracker::Forget(const ObjectIdSet& ids) {
35 for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) { 35 for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) {
36 LOG(INFO) << "Forgetting invalidation state for " << ObjectIdToString(*it); 36 LOG(INFO) << "Forgetting invalidation state for " << ObjectIdToString(*it);
37 } 37 }
38 } 38 }
39 39
40 void NullInvalidationStateTracker::SetInvalidatorClientId(
41 const std::string& data) {
42 LOG(INFO) << "Setting invalidator client ID to: " << data;
43 }
44
45 std::string NullInvalidationStateTracker::GetInvalidatorClientId() const {
46 return std::string();
47 }
48
40 std::string NullInvalidationStateTracker::GetBootstrapData() const { 49 std::string NullInvalidationStateTracker::GetBootstrapData() const {
41 return std::string(); 50 return std::string();
42 } 51 }
43 52
44 void NullInvalidationStateTracker::SetBootstrapData(const std::string& data) { 53 void NullInvalidationStateTracker::SetBootstrapData(const std::string& data) {
45 std::string base64_data; 54 std::string base64_data;
46 CHECK(base::Base64Encode(data, &base64_data)); 55 CHECK(base::Base64Encode(data, &base64_data));
47 LOG(INFO) << "Setting bootstrap data to: " << base64_data; 56 LOG(INFO) << "Setting bootstrap data to: " << base64_data;
48 } 57 }
49 58
50 void NullInvalidationStateTracker::GenerateAckHandles( 59 void NullInvalidationStateTracker::GenerateAckHandles(
51 const ObjectIdSet& ids, 60 const ObjectIdSet& ids,
52 const scoped_refptr<base::TaskRunner>& task_runner, 61 const scoped_refptr<base::TaskRunner>& task_runner,
53 base::Callback<void(const AckHandleMap&)> callback) { 62 base::Callback<void(const AckHandleMap&)> callback) {
54 AckHandleMap ack_handles; 63 AckHandleMap ack_handles;
55 for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) { 64 for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) {
56 ack_handles.insert(std::make_pair(*it, AckHandle::InvalidAckHandle())); 65 ack_handles.insert(std::make_pair(*it, AckHandle::InvalidAckHandle()));
57 } 66 }
58 CHECK(task_runner->PostTask(FROM_HERE, base::Bind(callback, ack_handles))); 67 CHECK(task_runner->PostTask(FROM_HERE, base::Bind(callback, ack_handles)));
59 } 68 }
60 69
61 void NullInvalidationStateTracker::Acknowledge(const invalidation::ObjectId& id, 70 void NullInvalidationStateTracker::Acknowledge(const invalidation::ObjectId& id,
62 const AckHandle& ack_handle) { 71 const AckHandle& ack_handle) {
63 LOG(INFO) << "Received ack for " << ObjectIdToString(id); 72 LOG(INFO) << "Received ack for " << ObjectIdToString(id);
64 } 73 }
65 74
66 } // namespace syncer 75 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/tools/null_invalidation_state_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698