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

Unified Diff: components/sync/model_impl/shared_model_type_processor.cc

Issue 2935583002: [Sync] Implement support for untracking new entities (Closed)
Patch Set: add comments Created 3 years, 6 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 6ac5136885d29e833cf9b83303c3166a01cb1baf..17a767124995d7f3937ab77f5352223f33c38929 100644
--- a/components/sync/model_impl/shared_model_type_processor.cc
+++ b/components/sync/model_impl/shared_model_type_processor.cc
@@ -279,6 +279,17 @@ void SharedModelTypeProcessor::UpdateStorageKey(
metadata_change_list->UpdateMetadata(storage_key, entity->metadata());
}
+void SharedModelTypeProcessor::UntrackEntity(const EntityData& entity_data) {
+ const std::string& client_tag_hash = entity_data.client_tag_hash;
+ DCHECK(!client_tag_hash.empty());
+
+ ProcessorEntityTracker* entity = GetEntityForTagHash(client_tag_hash);
+ DCHECK(entity);
+ DCHECK(entity->storage_key().empty());
+
+ entities_.erase(client_tag_hash);
+}
+
void SharedModelTypeProcessor::FlushPendingCommitRequests() {
CommitRequestDataList commit_requests;

Powered by Google App Engine
This is Rietveld 408576698