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

Unified Diff: sync/tools/sync_client.cc

Issue 11415049: Implement features needed for local ack handling in InvalidationStateTracker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: sync/tools/sync_client.cc
diff --git a/sync/tools/sync_client.cc b/sync/tools/sync_client.cc
index c2dc657e1d7ae4939bef35e68785102c18194955..0b02e18e4696d4f79d05410ada18f050f2c9cb8d 100644
--- a/sync/tools/sync_client.cc
+++ b/sync/tools/sync_client.cc
@@ -76,11 +76,13 @@ class NullInvalidationStateTracker
return InvalidationStateMap();
}
- virtual void SetMaxVersion(
+ virtual void SetMaxVersionAndPayload(
const invalidation::ObjectId& id,
- int64 max_invalidation_version) OVERRIDE {
+ int64 max_invalidation_version,
+ const std::string& payload) OVERRIDE {
VLOG(1) << "Setting max invalidation version for "
- << ObjectIdToString(id) << " to " << max_invalidation_version;
+ << ObjectIdToString(id) << " to " << max_invalidation_version
+ << " with payload " << payload;
}
virtual void Forget(const ObjectIdSet& ids) OVERRIDE {
@@ -98,6 +100,22 @@ class NullInvalidationStateTracker
CHECK(base::Base64Encode(data, &base64_data));
VLOG(1) << "Setting bootstrap data to: " << base64_data;
}
+
+ virtual void GenerateAckHandles(
+ const ObjectIdSet& ids,
+ const scoped_refptr<base::TaskRunner>& task_runner,
+ base::Callback<void(const AckHandleMap&)> callback) OVERRIDE {
+ AckHandleMap ack_handles;
+ for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) {
+ ack_handles.insert(std::make_pair(*it, AckHandle::InvalidAckHandle()));
+ }
+ task_runner->PostTask(FROM_HERE, base::Bind(callback, ack_handles));
akalin 2012/11/28 00:11:42 process return value (CHECK?)
dcheng 2012/11/30 01:42:54 Done.
+ }
+
+ virtual void Acknowledge(const invalidation::ObjectId& id,
+ const AckHandle& ack_handle) OVERRIDE {
+ VLOG(1) << "Received ack for " << ObjectIdToString(id);
+ }
};
// Needed to use a real host resolver.

Powered by Google App Engine
This is Rietveld 408576698