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