OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_SYNC_API_STUB_MODEL_TYPE_SERVICE_H_ | |
6 #define COMPONENTS_SYNC_API_STUB_MODEL_TYPE_SERVICE_H_ | |
7 | |
8 #include <memory> | |
9 #include <string> | |
10 | |
11 #include "components/sync/api/model_type_service.h" | |
12 | |
13 namespace syncer { | |
14 | |
15 // A non-functional implementation of ModelTypeService for | |
16 // testing purposes. | |
17 class StubModelTypeService : public ModelTypeService { | |
18 public: | |
19 StubModelTypeService(); | |
20 explicit StubModelTypeService( | |
21 const ChangeProcessorFactory& change_processor_factory); | |
22 ~StubModelTypeService() override; | |
23 | |
24 std::unique_ptr<MetadataChangeList> CreateMetadataChangeList() override; | |
25 SyncError MergeSyncData( | |
26 std::unique_ptr<MetadataChangeList> metadata_change_list, | |
27 EntityDataMap entity_data_map) override; | |
28 SyncError ApplySyncChanges( | |
29 std::unique_ptr<MetadataChangeList> metadata_change_list, | |
30 EntityChangeList entity_changes) override; | |
31 void GetData(StorageKeyList storage_keys, DataCallback callback) override; | |
32 void GetAllData(DataCallback callback) override; | |
33 std::string GetClientTag(const EntityData& entity_data) override; | |
34 std::string GetStorageKey(const EntityData& entity_data) override; | |
35 void OnChangeProcessorSet() override; | |
36 | |
37 bool HasChangeProcessor() const; | |
38 }; | |
39 | |
40 } // namespace syncer | |
41 | |
42 #endif // COMPONENTS_SYNC_API_STUB_MODEL_TYPE_SERVICE_H_ | |
OLD | NEW |