| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "components/sync/api/fake_model_type_change_processor.h" | 5 #include "components/sync/api/fake_model_type_change_processor.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "components/sync/api/metadata_batch.h" | 9 #include "components/sync/api/metadata_batch.h" |
| 10 #include "components/sync/api/model_type_service.h" | 10 #include "components/sync/api/model_type_service.h" |
| 11 #include "components/sync/api/sync_error.h" | 11 #include "components/sync/api/sync_error.h" |
| 12 | 12 |
| 13 namespace syncer_v2 { | 13 namespace syncer { |
| 14 | 14 |
| 15 // static | 15 // static |
| 16 std::unique_ptr<ModelTypeChangeProcessor> FakeModelTypeChangeProcessor::Create( | 16 std::unique_ptr<ModelTypeChangeProcessor> FakeModelTypeChangeProcessor::Create( |
| 17 syncer::ModelType type, | 17 ModelType type, |
| 18 ModelTypeService* service) { | 18 ModelTypeService* service) { |
| 19 return base::WrapUnique(new FakeModelTypeChangeProcessor()); | 19 return base::WrapUnique(new FakeModelTypeChangeProcessor()); |
| 20 } | 20 } |
| 21 | 21 |
| 22 FakeModelTypeChangeProcessor::FakeModelTypeChangeProcessor() {} | 22 FakeModelTypeChangeProcessor::FakeModelTypeChangeProcessor() {} |
| 23 FakeModelTypeChangeProcessor::~FakeModelTypeChangeProcessor() {} | 23 FakeModelTypeChangeProcessor::~FakeModelTypeChangeProcessor() {} |
| 24 | 24 |
| 25 void FakeModelTypeChangeProcessor::Put( | 25 void FakeModelTypeChangeProcessor::Put( |
| 26 const std::string& client_tag, | 26 const std::string& client_tag, |
| 27 std::unique_ptr<EntityData> entity_data, | 27 std::unique_ptr<EntityData> entity_data, |
| 28 MetadataChangeList* metadata_change_list) {} | 28 MetadataChangeList* metadata_change_list) {} |
| 29 | 29 |
| 30 void FakeModelTypeChangeProcessor::Delete( | 30 void FakeModelTypeChangeProcessor::Delete( |
| 31 const std::string& client_tag, | 31 const std::string& client_tag, |
| 32 MetadataChangeList* metadata_change_list) {} | 32 MetadataChangeList* metadata_change_list) {} |
| 33 | 33 |
| 34 void FakeModelTypeChangeProcessor::OnMetadataLoaded( | 34 void FakeModelTypeChangeProcessor::OnMetadataLoaded( |
| 35 syncer::SyncError error, | 35 SyncError error, |
| 36 std::unique_ptr<MetadataBatch> batch) {} | 36 std::unique_ptr<MetadataBatch> batch) {} |
| 37 | 37 |
| 38 void FakeModelTypeChangeProcessor::OnSyncStarting( | 38 void FakeModelTypeChangeProcessor::OnSyncStarting( |
| 39 std::unique_ptr<syncer::DataTypeErrorHandler> error_handler, | 39 std::unique_ptr<DataTypeErrorHandler> error_handler, |
| 40 const StartCallback& callback) { | 40 const StartCallback& callback) { |
| 41 if (!callback.is_null()) { | 41 if (!callback.is_null()) { |
| 42 callback.Run(syncer::SyncError(), nullptr); | 42 callback.Run(SyncError(), nullptr); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 | 45 |
| 46 void FakeModelTypeChangeProcessor::DisableSync() {} | 46 void FakeModelTypeChangeProcessor::DisableSync() {} |
| 47 | 47 |
| 48 syncer::SyncError FakeModelTypeChangeProcessor::CreateAndUploadError( | 48 SyncError FakeModelTypeChangeProcessor::CreateAndUploadError( |
| 49 const tracked_objects::Location& location, | 49 const tracked_objects::Location& location, |
| 50 const std::string& message) { | 50 const std::string& message) { |
| 51 return syncer::SyncError(); | 51 return SyncError(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace syncer_v2 | 54 } // namespace syncer |
| OLD | NEW |