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

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

Issue 2557713004: [Sync] Remove entry from SMTP::storage_key_to_tag_hash_ when deleting tracker (Closed)
Patch Set: Created 4 years 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 b55963b38da1a4620e56db764787aa9626c5760d..6b5816f90a209628f7a6ad2a741908e70f139088 100644
--- a/components/sync/model_impl/shared_model_type_processor.cc
+++ b/components/sync/model_impl/shared_model_type_processor.cc
@@ -288,6 +288,7 @@ void SharedModelTypeProcessor::OnCommitCompleted(
if (entity->CanClearMetadata()) {
change_list->ClearMetadata(entity->storage_key());
+ storage_key_to_tag_hash_.erase(entity->storage_key());
entities_.erase(entity->metadata().client_tag_hash());
} else {
change_list->UpdateMetadata(entity->storage_key(), entity->metadata());
@@ -334,6 +335,7 @@ void SharedModelTypeProcessor::OnUpdateReceived(
if (entity->CanClearMetadata()) {
metadata_changes->ClearMetadata(entity->storage_key());
+ storage_key_to_tag_hash_.erase(entity->storage_key());
entities_.erase(entity->metadata().client_tag_hash());
} else {
metadata_changes->UpdateMetadata(entity->storage_key(),

Powered by Google App Engine
This is Rietveld 408576698