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

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

Issue 56113003: Implement new invalidations ack tracking system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modify drive TODO comment + rebase Created 7 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: chrome/browser/sync/glue/sync_backend_host_impl.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_impl.cc b/chrome/browser/sync/glue/sync_backend_host_impl.cc
index f9e7ff4905d7c95ca1fe2c3644753022853f570a..a82b2fa439604a471fc9cbaeccbbe77d72e200a8 100644
--- a/chrome/browser/sync/glue/sync_backend_host_impl.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_impl.cc
@@ -26,6 +26,7 @@
#include "sync/internal_api/public/sync_manager_factory.h"
#include "sync/internal_api/public/util/experiments.h"
#include "sync/internal_api/public/util/sync_string_conversions.h"
+#include "sync/notifier/object_id_invalidation_map.h"
// Helper macros to log with the syncer thread name; useful when there
// are multiple syncers involved.
@@ -652,14 +653,7 @@ void SyncBackendHostImpl::OnIncomingInvalidation(
const syncer::ObjectIdInvalidationMap& invalidation_map) {
// 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);
- }
-
+ invalidation_map.AcknowledgeAll();
registrar_->sync_thread()->message_loop()->PostTask(
FROM_HERE,
base::Bind(&SyncBackendHostCore::DoOnIncomingInvalidation,
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl.h ('k') | chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698