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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 23441042: Refactor common invalidation framework types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another browser test fix Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
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 cf765bd14617b5d0d4eae2adac5ed3badf7516aa..89b08249992e53c418b1157846d93ec0453f0a61 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -1505,13 +1505,14 @@ void SyncBackendHost::OnInvalidatorStateChange(syncer::InvalidatorState state) {
void SyncBackendHost::OnIncomingInvalidation(
const syncer::ObjectIdInvalidationMap& invalidation_map) {
- // TODO(dcheng): Acknowledge immediately for now. Fix this once the
- // invalidator doesn't repeatedly ping for unacknowledged invaliations, since
- // it conflicts with the sync scheduler's internal backoff algorithm.
- // See http://crbug.com/124149 for more information.
- for (syncer::ObjectIdInvalidationMap::const_iterator it =
- invalidation_map.begin(); it != invalidation_map.end(); ++it) {
- invalidator_->AcknowledgeInvalidation(it->first, it->second.ack_handle);
+ // TODO(rlarocque): Acknowledge these invalidations only after the syncer has
+ // acted on them and saved the results to disk.
+ syncer::ObjectIdSet ids = invalidation_map.GetObjectIds();
+ for (syncer::ObjectIdSet::const_iterator it = ids.begin();
+ it != ids.end(); ++it) {
+ const syncer::AckHandle& handle =
+ invalidation_map.ForObject(*it).back().ack_handle();
+ invalidator_->AcknowledgeInvalidation(*it, handle);
}
registrar_->sync_thread()->message_loop()->PostTask(

Powered by Google App Engine
This is Rietveld 408576698