| 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 "chrome/browser/sync/profile_sync_components_factory_mock.h" | 5 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" |
| 6 | 6 |
| 7 #include "chrome/browser/sync/glue/local_device_info_provider_mock.h" | |
| 8 #include "components/sync_driver/change_processor.h" | 7 #include "components/sync_driver/change_processor.h" |
| 8 #include "components/sync_driver/local_device_info_provider_mock.h" |
| 9 #include "components/sync_driver/model_associator.h" | 9 #include "components/sync_driver/model_associator.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 11 #include "sync/api/attachments/fake_attachment_store.h" | 11 #include "sync/api/attachments/fake_attachment_store.h" |
| 12 #include "sync/internal_api/public/attachments/attachment_service_impl.h" | 12 #include "sync/internal_api/public/attachments/attachment_service_impl.h" |
| 13 | 13 |
| 14 using sync_driver::AssociatorInterface; | 14 using sync_driver::AssociatorInterface; |
| 15 using sync_driver::ChangeProcessor; | 15 using sync_driver::ChangeProcessor; |
| 16 using testing::_; | 16 using testing::_; |
| 17 using testing::InvokeWithoutArgs; | 17 using testing::InvokeWithoutArgs; |
| 18 using testing::Return; | 18 using testing::Return; |
| 19 | 19 |
| 20 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock() | 20 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock() |
| 21 : local_device_(new browser_sync::LocalDeviceInfoProviderMock()) { | 21 : local_device_(new sync_driver::LocalDeviceInfoProviderMock()) { |
| 22 } | 22 } |
| 23 | 23 |
| 24 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock( | 24 ProfileSyncComponentsFactoryMock::ProfileSyncComponentsFactoryMock( |
| 25 AssociatorInterface* model_associator, ChangeProcessor* change_processor) | 25 AssociatorInterface* model_associator, ChangeProcessor* change_processor) |
| 26 : model_associator_(model_associator), | 26 : model_associator_(model_associator), |
| 27 change_processor_(change_processor), | 27 change_processor_(change_processor), |
| 28 local_device_(new browser_sync::LocalDeviceInfoProviderMock()) { | 28 local_device_(new sync_driver::LocalDeviceInfoProviderMock()) { |
| 29 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)). | 29 ON_CALL(*this, CreateBookmarkSyncComponents(_, _)). |
| 30 WillByDefault( | 30 WillByDefault( |
| 31 InvokeWithoutArgs( | 31 InvokeWithoutArgs( |
| 32 this, | 32 this, |
| 33 &ProfileSyncComponentsFactoryMock::MakeSyncComponents)); | 33 &ProfileSyncComponentsFactoryMock::MakeSyncComponents)); |
| 34 } | 34 } |
| 35 | 35 |
| 36 ProfileSyncComponentsFactoryMock::~ProfileSyncComponentsFactoryMock() {} | 36 ProfileSyncComponentsFactoryMock::~ProfileSyncComponentsFactoryMock() {} |
| 37 | 37 |
| 38 scoped_ptr<syncer::AttachmentService> | 38 scoped_ptr<syncer::AttachmentService> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 51 | 51 |
| 52 scoped_ptr<sync_driver::LocalDeviceInfoProvider> | 52 scoped_ptr<sync_driver::LocalDeviceInfoProvider> |
| 53 ProfileSyncComponentsFactoryMock::CreateLocalDeviceInfoProvider() { | 53 ProfileSyncComponentsFactoryMock::CreateLocalDeviceInfoProvider() { |
| 54 return local_device_.Pass(); | 54 return local_device_.Pass(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void ProfileSyncComponentsFactoryMock::SetLocalDeviceInfoProvider( | 57 void ProfileSyncComponentsFactoryMock::SetLocalDeviceInfoProvider( |
| 58 scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device) { | 58 scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device) { |
| 59 local_device_ = local_device.Pass(); | 59 local_device_ = local_device.Pass(); |
| 60 } | 60 } |
| OLD | NEW |