| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_driver/sync_api_component_factory_mock.h" | 5 #include "components/sync_driver/sync_api_component_factory_mock.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "components/sync_driver/change_processor.h" | 9 #include "components/sync_driver/change_processor.h" |
| 10 #include "components/sync_driver/local_device_info_provider_mock.h" | 10 #include "components/sync_driver/local_device_info_provider_mock.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 local_device_(new sync_driver::LocalDeviceInfoProviderMock()) { | 29 local_device_(new sync_driver::LocalDeviceInfoProviderMock()) { |
| 30 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)). | 30 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)). |
| 31 WillByDefault( | 31 WillByDefault( |
| 32 InvokeWithoutArgs( | 32 InvokeWithoutArgs( |
| 33 this, | 33 this, |
| 34 &SyncApiComponentFactoryMock::MakeSyncComponents)); | 34 &SyncApiComponentFactoryMock::MakeSyncComponents)); |
| 35 } | 35 } |
| 36 | 36 |
| 37 SyncApiComponentFactoryMock::~SyncApiComponentFactoryMock() {} | 37 SyncApiComponentFactoryMock::~SyncApiComponentFactoryMock() {} |
| 38 | 38 |
| 39 scoped_ptr<syncer::AttachmentService> | 39 std::unique_ptr<syncer::AttachmentService> |
| 40 SyncApiComponentFactoryMock::CreateAttachmentService( | 40 SyncApiComponentFactoryMock::CreateAttachmentService( |
| 41 scoped_ptr<syncer::AttachmentStoreForSync> attachment_store, | 41 std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store, |
| 42 const syncer::UserShare& user_share, | 42 const syncer::UserShare& user_share, |
| 43 const std::string& store_birthday, | 43 const std::string& store_birthday, |
| 44 syncer::ModelType model_type, | 44 syncer::ModelType model_type, |
| 45 syncer::AttachmentService::Delegate* delegate) { | 45 syncer::AttachmentService::Delegate* delegate) { |
| 46 return syncer::AttachmentServiceImpl::CreateForTest(); | 46 return syncer::AttachmentServiceImpl::CreateForTest(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 sync_driver::SyncApiComponentFactory::SyncComponents | 49 sync_driver::SyncApiComponentFactory::SyncComponents |
| 50 SyncApiComponentFactoryMock::MakeSyncComponents() { | 50 SyncApiComponentFactoryMock::MakeSyncComponents() { |
| 51 return sync_driver::SyncApiComponentFactory::SyncComponents( | 51 return sync_driver::SyncApiComponentFactory::SyncComponents( |
| 52 model_associator_.release(), change_processor_.release()); | 52 model_associator_.release(), change_processor_.release()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 scoped_ptr<sync_driver::LocalDeviceInfoProvider> | 55 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> |
| 56 SyncApiComponentFactoryMock::CreateLocalDeviceInfoProvider() { | 56 SyncApiComponentFactoryMock::CreateLocalDeviceInfoProvider() { |
| 57 return std::move(local_device_); | 57 return std::move(local_device_); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void SyncApiComponentFactoryMock::SetLocalDeviceInfoProvider( | 60 void SyncApiComponentFactoryMock::SetLocalDeviceInfoProvider( |
| 61 scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device) { | 61 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> local_device) { |
| 62 local_device_ = std::move(local_device); | 62 local_device_ = std::move(local_device); |
| 63 } | 63 } |
| OLD | NEW |