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