| Index: components/sync/model/model_type_store.h
|
| diff --git a/components/sync/model/model_type_store.h b/components/sync/model/model_type_store.h
|
| index 07d1082d8273869ab228c40ddb3f969fcc7f4f6a..02448ea0c0fb30d2c79a4e555b27167368dfd91c 100644
|
| --- a/components/sync/model/model_type_store.h
|
| +++ b/components/sync/model/model_type_store.h
|
| @@ -70,12 +70,18 @@ class ModelTypeStore {
|
| class WriteBatch {
|
| public:
|
| // Creates a MetadataChangeList that will accumulate metadata changes and
|
| - // can later pass them to a WriteBatch via TransferChanges. Use this when
|
| + // can later be passed to a WriteBatch via TransferChanges. Use this when
|
| // you need a MetadataChangeList and do not have a WriteBatch in scope.
|
| static std::unique_ptr<MetadataChangeList> CreateMetadataChangeList();
|
|
|
| virtual ~WriteBatch();
|
|
|
| + // Write the given |value| for data with |id|.
|
| + void WriteData(const std::string& id, const std::string& value);
|
| +
|
| + // Delete the record for data with |id|.
|
| + void DeleteData(const std::string& id);
|
| +
|
| // Provides access to a MetadataChangeList that will pass its changes
|
| // directly into this WriteBatch. Use this when you need a
|
| // MetadataChangeList and already have a WriteBatch in scope.
|
| @@ -164,7 +170,12 @@ class ModelTypeStore {
|
| virtual void CommitWriteBatch(std::unique_ptr<WriteBatch> write_batch,
|
| const CallbackWithResult& callback) = 0;
|
|
|
| - // Write operations.
|
| + protected:
|
| + friend class AccumulatingMetadataChangeList;
|
| + friend class ModelTypeStoreImplTest;
|
| + friend class PassthroughMetadataChangeList;
|
| +
|
| + // Write operations; access via WriteBatch.
|
| virtual void WriteData(WriteBatch* write_batch,
|
| const std::string& id,
|
| const std::string& value) = 0;
|
|
|