| Index: chrome/browser/sync/glue/sync_backend_host.cc
|
| diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
|
| index 158ae2e9866d65ce793df94a66f2025f37103c37..880e285d0ac2d89dc55c665416dc54080c3ee3d8 100644
|
| --- a/chrome/browser/sync/glue/sync_backend_host.cc
|
| +++ b/chrome/browser/sync/glue/sync_backend_host.cc
|
| @@ -153,6 +153,11 @@ class SyncBackendHost::Core
|
| // SyncBackendHost::UpdateRegisteredInvalidationIds.
|
| void DoUpdateRegisteredInvalidationIds(const syncer::ObjectIdSet& ids);
|
|
|
| + // Called to acknowledge an invalidation on behalf of
|
| + // SyncBackendHost::AcknowledgeInvalidation.
|
| + void DoAcknowledgeInvalidation(const invalidation::ObjectId& id,
|
| + const syncer::AckHandle& ack_handle);
|
| +
|
| // Called to tell the syncapi to start syncing (generally after
|
| // initialization and authentication).
|
| void DoStartSyncing(const syncer::ModelSafeRoutingInfo& routing_info);
|
| @@ -477,6 +482,15 @@ void SyncBackendHost::UpdateRegisteredInvalidationIds(
|
| core_.get(), ids));
|
| }
|
|
|
| +void SyncBackendHost::AcknowledgeInvalidation(
|
| + const invalidation::ObjectId& id, const syncer::AckHandle& ack_handle) {
|
| + DCHECK_EQ(MessageLoop::current(), frontend_loop_);
|
| + DCHECK(sync_thread_.IsRunning());
|
| + sync_thread_.message_loop()->PostTask(FROM_HERE,
|
| + base::Bind(&SyncBackendHost::Core::DoAcknowledgeInvalidation,
|
| + core_.get(), id, ack_handle));
|
| +}
|
| +
|
| void SyncBackendHost::StartSyncingWithServer() {
|
| SDVLOG(1) << "SyncBackendHost::StartSyncingWithServer called.";
|
|
|
| @@ -1238,6 +1252,18 @@ void SyncBackendHost::Core::DoUpdateRegisteredInvalidationIds(
|
| }
|
| }
|
|
|
| +void SyncBackendHost::Core::DoAcknowledgeInvalidation(
|
| + const invalidation::ObjectId& id, const syncer::AckHandle& ack_handle) {
|
| + DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| + // |sync_manager_| may end up being NULL here in tests (in
|
| + // synchronous initialization mode).
|
| + //
|
| + // TODO(akalin): Fix this behavior (see http://crbug.com/140354).
|
| + if (sync_manager_.get()) {
|
| + sync_manager_->AcknowledgeInvalidation(id, ack_handle);
|
| + }
|
| +}
|
| +
|
| void SyncBackendHost::Core::DoStartSyncing(
|
| const syncer::ModelSafeRoutingInfo& routing_info) {
|
| DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
|
|