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

Unified Diff: components/sync/engine_impl/uss_migrator.cc

Issue 2630613002: [Sync] USS: Filter out tombstones for initial sync. (Closed)
Patch Set: Fix TestEntryFactory for realz. Created 3 years, 11 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: components/sync/engine_impl/uss_migrator.cc
diff --git a/components/sync/engine_impl/uss_migrator.cc b/components/sync/engine_impl/uss_migrator.cc
index b853cb2faa7d448e2949772d81188d97607cf8cb..91db78f3470573c4f95d1e2ba53e0616a114d473 100644
--- a/components/sync/engine_impl/uss_migrator.cc
+++ b/components/sync/engine_impl/uss_migrator.cc
@@ -103,8 +103,11 @@ bool MigrateDirectoryDataWithBatchSize(ModelType type,
worker->AbortMigration();
return false;
}
- entity_ptrs.push_back(entity.get());
- entities.push_back(std::move(entity));
+ // Ignore tombstones; they are not included for initial GetUpdates.
+ if (!entity->deleted()) {
+ entity_ptrs.push_back(entity.get());
+ entities.push_back(std::move(entity));
+ }
}
worker->ProcessGetUpdatesResponse(progress, context, entity_ptrs, nullptr);
« no previous file with comments | « components/sync/engine_impl/test_entry_factory.cc ('k') | components/sync/engine_impl/uss_migrator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698