| Index: sync/tools/sync_listen_notifications.cc
|
| diff --git a/sync/tools/sync_listen_notifications.cc b/sync/tools/sync_listen_notifications.cc
|
| index bc9008815be70466f1b20225b2ed5f74607cf215..f52429875c99e5b3f50251d3fddaebf3731f1ff2 100644
|
| --- a/sync/tools/sync_listen_notifications.cc
|
| +++ b/sync/tools/sync_listen_notifications.cc
|
| @@ -8,8 +8,11 @@
|
|
|
| #include "base/at_exit.h"
|
| #include "base/base64.h"
|
| +#include "base/bind.h"
|
| +#include "base/callback.h"
|
| #include "base/command_line.h"
|
| #include "base/compiler_specific.h"
|
| +#include "base/location.h"
|
| #include "base/logging.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| @@ -89,11 +92,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 {
|
| LOG(INFO) << "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 {
|
| @@ -111,6 +116,22 @@ class NullInvalidationStateTracker
|
| CHECK(base::Base64Encode(data, &base64_data));
|
| LOG(INFO) << "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));
|
| + }
|
| +
|
| + virtual void Acknowledge(const invalidation::ObjectId& id,
|
| + const AckHandle& ack_handle) OVERRIDE {
|
| + LOG(INFO) << "Received ack for " << ObjectIdToString(id);
|
| + }
|
| };
|
|
|
| // Needed to use a real host resolver.
|
|
|