Commit 7b7afe5c authored by dcheng@chromium.org's avatar dcheng@chromium.org

Acknowledge invalidations from DriveFileSyncService.

In r186079, local invalidations and acknowledgements were fully
implemented. This means that if an InvalidationHandler doesn't
acknowledge invalidations that it receives, it will receive wake up
pings periodically afterwards.

BUG=180693


Review URL: https://chromiumcodereview.appspot.com/13913018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193410 0039d316-1c4b-4281-b951-d872f2087c98
parent 79635310
...@@ -167,6 +167,14 @@ void DriveFileSyncService::OnIncomingInvalidation( ...@@ -167,6 +167,14 @@ void DriveFileSyncService::OnIncomingInvalidation(
ipc::invalidation::ObjectSource::COSMO_CHANGELOG, ipc::invalidation::ObjectSource::COSMO_CHANGELOG,
kDriveInvalidationObjectId); kDriveInvalidationObjectId);
DCHECK_EQ(1U, invalidation_map.count(object_id)); DCHECK_EQ(1U, invalidation_map.count(object_id));
// TODO(dcheng): Only acknowledge the invalidation once the fetch has
// completed. http://crbug.com/156843
ProfileSyncService* profile_sync_service =
ProfileSyncServiceFactory::GetForProfile(profile_);
CHECK(profile_sync_service);
profile_sync_service->AcknowledgeInvalidation(
invalidation_map.begin()->first,
invalidation_map.begin()->second.ack_handle);
may_have_unfetched_changes_ = true; may_have_unfetched_changes_ = true;
MaybeStartFetchChanges(); MaybeStartFetchChanges();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment