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