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

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

Issue 2916133002: [Sync] Support commit only types. (Closed)
Patch Set: Rebase again. 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.h
diff --git a/components/sync/model_impl/shared_model_type_processor.h b/components/sync/model_impl/shared_model_type_processor.h
index 17ac9e9617057fda49f7b6e138a28306accb1efa..c64f8000d75415b29531d9a23383956238e95c2d 100644
--- a/components/sync/model_impl/shared_model_type_processor.h
+++ b/components/sync/model_impl/shared_model_type_processor.h
@@ -40,7 +40,8 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
public:
SharedModelTypeProcessor(ModelType type,
ModelTypeSyncBridge* bridge,
- const base::RepeatingClosure& dump_stack);
+ const base::RepeatingClosure& dump_stack,
+ bool commit_only);
~SharedModelTypeProcessor() override;
// Whether the processor is allowing changes to its model type. If this is
@@ -218,6 +219,12 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
// MergeSyncData/ApplySyncChanges.
std::map<std::string, std::string> storage_key_to_tag_hash_;
+ // If the processor should behave as if |type_| is one of the commit only
+ // model types. For this processor, being commit only means that on commit
+ // confirmation, we should delete local data, because the model side never
+ // intends to read it. This includes both data and metadata.
+ bool commit_only_;
+
SEQUENCE_CHECKER(sequence_checker_);
// WeakPtrFactory for this processor which will be sent to sync thread.
« no previous file with comments | « components/sync/model/model_type_change_processor.cc ('k') | components/sync/model_impl/shared_model_type_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698