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

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

Issue 2489683002: [Sync] Make all ModelTypeStore write methods go through WriteBatch. (Closed)
Patch Set: Address comment. Created 4 years, 1 month 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/mock_model_type_store.h
diff --git a/components/sync/model/mock_model_type_store.h b/components/sync/model/mock_model_type_store.h
index a9c1090956b609ed2852c85d564404ce13bcd168..880c8e29ad8ba9fc7e34773d889305bc0659ed24 100644
--- a/components/sync/model/mock_model_type_store.h
+++ b/components/sync/model/mock_model_type_store.h
@@ -73,18 +73,6 @@ class MockModelTypeStore : public ModelTypeStore {
void CommitWriteBatch(std::unique_ptr<WriteBatch> write_batch,
const CallbackWithResult& callback) override;
- void WriteData(WriteBatch* write_batch,
- const std::string& id,
- const std::string& value) override;
- void WriteMetadata(WriteBatch* write_batch,
- const std::string& id,
- const std::string& value) override;
- void WriteGlobalMetadata(WriteBatch* write_batch,
- const std::string& value) override;
- void DeleteData(WriteBatch* write_batch, const std::string& id) override;
- void DeleteMetadata(WriteBatch* write_batch, const std::string& id) override;
- void DeleteGlobalMetadata(WriteBatch* write_batch) override;
-
// Register handler functions.
void RegisterReadDataHandler(const ReadDataSignature& handler);
void RegisterReadAllDataHandler(const ReadAllDataSignature& handler);
@@ -100,6 +88,20 @@ class MockModelTypeStore : public ModelTypeStore {
void RegisterDeleteGlobalMetadataHandler(
const DeleteGlobalMetadataSignature& handler);
+ protected:
+ // ModelTypeStore implementation.
+ void WriteData(WriteBatch* write_batch,
+ const std::string& id,
+ const std::string& value) override;
+ void WriteMetadata(WriteBatch* write_batch,
+ const std::string& id,
+ const std::string& value) override;
+ void WriteGlobalMetadata(WriteBatch* write_batch,
+ const std::string& value) override;
+ void DeleteData(WriteBatch* write_batch, const std::string& id) override;
+ void DeleteMetadata(WriteBatch* write_batch, const std::string& id) override;
+ void DeleteGlobalMetadata(WriteBatch* write_batch) override;
+
private:
ReadDataSignature read_data_handler_;
ReadAllDataSignature read_all_data_handler_;
« no previous file with comments | « components/sync/device_info/device_info_sync_bridge_unittest.cc ('k') | components/sync/model/model_type_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698