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

Side by Side Diff: components/sync/model/mock_model_type_store.h

Issue 2689773002: [Sync] Replace typedef with using. (Closed)
Patch Set: [Sync] Replace typedef with using. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SYNC_MODEL_MOCK_MODEL_TYPE_STORE_H_ 5 #ifndef COMPONENTS_SYNC_MODEL_MOCK_MODEL_TYPE_STORE_H_
6 #define COMPONENTS_SYNC_MODEL_MOCK_MODEL_TYPE_STORE_H_ 6 #define COMPONENTS_SYNC_MODEL_MOCK_MODEL_TYPE_STORE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 26 matching lines...) Expand all
37 // mock_model_type_store.RegisterReadDataHandler(base::Bind(&OnReadData)); 37 // mock_model_type_store.RegisterReadDataHandler(base::Bind(&OnReadData));
38 // ModelTypeStore::IdList id_list; 38 // ModelTypeStore::IdList id_list;
39 // id_list.push_back("id1"); 39 // id_list.push_back("id1");
40 // mock_model_type_store.ReadData(id_list, base::Bind(&ReadDone)); 40 // mock_model_type_store.ReadData(id_list, base::Bind(&ReadDone));
41 // === 41 // ===
42 // TODO(pavel): When in-memory store is available this class should delegate all 42 // TODO(pavel): When in-memory store is available this class should delegate all
43 // calls to it instead of returning empty successful results. 43 // calls to it instead of returning empty successful results.
44 class MockModelTypeStore : public ModelTypeStore { 44 class MockModelTypeStore : public ModelTypeStore {
45 public: 45 public:
46 // Signatures for all ModelTypeStore virtual functions. 46 // Signatures for all ModelTypeStore virtual functions.
47 typedef base::Callback<void(const ReadAllDataCallback&)> ReadAllDataSignature; 47 using ReadAllDataSignature = base::Callback<void(const ReadAllDataCallback&)>;
48 typedef base::Callback<void(const IdList&, const ReadDataCallback&)> 48 using ReadDataSignature =
49 ReadDataSignature; 49 base::Callback<void(const IdList&, const ReadDataCallback&)>;
50 typedef base::Callback<void(const ReadMetadataCallback& callback)> 50 using ReadAllMetadataSignature =
51 ReadAllMetadataSignature; 51 base::Callback<void(const ReadMetadataCallback& callback)>;
52 typedef base::Callback<void(std::unique_ptr<WriteBatch>, CallbackWithResult)> 52 using CommitWriteBatchSignature =
53 CommitWriteBatchSignature; 53 base::Callback<void(std::unique_ptr<WriteBatch>, CallbackWithResult)>;
54 typedef base::Callback< 54 using WriteRecordSignature =
55 void(WriteBatch*, const std::string&, const std::string&)> 55 base::Callback<void(WriteBatch*, const std::string&, const std::string&)>;
56 WriteRecordSignature; 56 using WriteGlobalMetadataSignature =
57 typedef base::Callback<void(WriteBatch*, const std::string&)> 57 base::Callback<void(WriteBatch*, const std::string&)>;
58 WriteGlobalMetadataSignature; 58 using DeleteRecordSignature =
59 typedef base::Callback<void(WriteBatch*, const std::string&)> 59 base::Callback<void(WriteBatch*, const std::string&)>;
60 DeleteRecordSignature; 60 using DeleteGlobalMetadataSignature = base::Callback<void(WriteBatch*)>;
61 typedef base::Callback<void(WriteBatch*)> DeleteGlobalMetadataSignature;
62 61
63 MockModelTypeStore(); 62 MockModelTypeStore();
64 ~MockModelTypeStore() override; 63 ~MockModelTypeStore() override;
65 64
66 // ModelTypeStore implementation. 65 // ModelTypeStore implementation.
67 void ReadData(const IdList& id_list, 66 void ReadData(const IdList& id_list,
68 const ReadDataCallback& callback) override; 67 const ReadDataCallback& callback) override;
69 void ReadAllData(const ReadAllDataCallback& callback) override; 68 void ReadAllData(const ReadAllDataCallback& callback) override;
70 void ReadAllMetadata(const ReadMetadataCallback& callback) override; 69 void ReadAllMetadata(const ReadMetadataCallback& callback) override;
71 70
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 WriteRecordSignature write_metadata_handler_; 110 WriteRecordSignature write_metadata_handler_;
112 WriteGlobalMetadataSignature write_global_metadata_handler_; 111 WriteGlobalMetadataSignature write_global_metadata_handler_;
113 DeleteRecordSignature delete_data_handler_; 112 DeleteRecordSignature delete_data_handler_;
114 DeleteRecordSignature delete_metadata_handler_; 113 DeleteRecordSignature delete_metadata_handler_;
115 DeleteGlobalMetadataSignature delete_global_metadata_handler_; 114 DeleteGlobalMetadataSignature delete_global_metadata_handler_;
116 }; 115 };
117 116
118 } // namespace syncer 117 } // namespace syncer
119 118
120 #endif // COMPONENTS_SYNC_MODEL_MOCK_MODEL_TYPE_STORE_H_ 119 #endif // COMPONENTS_SYNC_MODEL_MOCK_MODEL_TYPE_STORE_H_
OLDNEW
« no previous file with comments | « components/sync/model/metadata_batch.h ('k') | components/sync/model/model_type_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698