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

Unified Diff: components/sync/model_impl/shared_model_type_processor.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/model_impl/shared_model_type_processor.cc
diff --git a/components/sync/model_impl/shared_model_type_processor.cc b/components/sync/model_impl/shared_model_type_processor.cc
index d3e9f6f0613652ae7122b636cf20b1e18e937718..c3226ff28d95406fbef837f20ddba6c802695f7f 100644
--- a/components/sync/model_impl/shared_model_type_processor.cc
+++ b/components/sync/model_impl/shared_model_type_processor.cc
@@ -545,6 +545,11 @@ void SharedModelTypeProcessor::OnInitialUpdateReceived(
metadata_changes->UpdateModelTypeState(model_type_state_);
for (const UpdateResponseData& update : updates) {
+ if (update.entity->is_deleted()) {
+ DLOG(WARNING) << "Ignoring tombstone found during initial update: "
+ << "client_tag_hash = " << update.entity->client_tag_hash;
+ continue;
+ }
ProcessorEntityTracker* entity = CreateEntity(update.entity.value());
const std::string& storage_key = entity->storage_key();
entity->RecordAcceptedUpdate(update);

Powered by Google App Engine
This is Rietveld 408576698