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

Unified Diff: components/sync/model/model_type_change_processor.h

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/model_type_change_processor.h
diff --git a/components/sync/model/model_type_change_processor.h b/components/sync/model/model_type_change_processor.h
index 4e83b0044a63053bfe483dcb3e43225146229772..e6bfb9f6ebfc98a020ad24b90e01e2b88faefded 100644
--- a/components/sync/model/model_type_change_processor.h
+++ b/components/sync/model/model_type_change_processor.h
@@ -58,6 +58,14 @@ class ModelTypeChangeProcessor {
const std::string& storage_key,
MetadataChangeList* metadata_change_list) = 0;
+ // Remove entity metadata and do not track the entity. This function only
+ // applies to datatypes that can't generate storage key based on EntityData.
+ // Bridge should call this function when handling
+ // MergeSyncData/ApplySyncChanges to inform the processor that this entity
+ // should not been tracked. Datatypes that support GetStorageKey should call
+ // change_processor()->Delete() instead.
+ virtual void UntrackEntity(const EntityData& entity_data) = 0;
+
// The bridge is expected to call this exactly once unless it encounters an
// error. Ideally ModelReadyToSync() is called as soon as possible during
// initialization, and must be called before invoking either Put() or
« no previous file with comments | « components/sync/model/fake_model_type_sync_bridge.cc ('k') | components/sync/model_impl/shared_model_type_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698