| 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 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ | 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ |
| 6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ | 6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "components/sync_driver/data_type_controller.h" | 9 #include "components/sync_driver/data_type_controller.h" |
| 10 #include "components/sync_driver/data_type_error_handler.h" | 10 #include "components/sync_driver/data_type_error_handler.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 class SyncApiComponentFactoryMock | 23 class SyncApiComponentFactoryMock |
| 24 : public sync_driver::SyncApiComponentFactory { | 24 : public sync_driver::SyncApiComponentFactory { |
| 25 public: | 25 public: |
| 26 SyncApiComponentFactoryMock(); | 26 SyncApiComponentFactoryMock(); |
| 27 SyncApiComponentFactoryMock( | 27 SyncApiComponentFactoryMock( |
| 28 sync_driver::AssociatorInterface* model_associator, | 28 sync_driver::AssociatorInterface* model_associator, |
| 29 sync_driver::ChangeProcessor* change_processor); | 29 sync_driver::ChangeProcessor* change_processor); |
| 30 ~SyncApiComponentFactoryMock() override; | 30 ~SyncApiComponentFactoryMock() override; |
| 31 | 31 |
| 32 MOCK_METHOD1(RegisterDataTypes, void(sync_driver::SyncClient*)); | 32 MOCK_METHOD1(RegisterDataTypes, void(const RegisterDataTypesMethod&)); |
| 33 MOCK_METHOD5(CreateDataTypeManager, | 33 MOCK_METHOD5(CreateDataTypeManager, |
| 34 sync_driver::DataTypeManager*( | 34 sync_driver::DataTypeManager*( |
| 35 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&, | 35 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&, |
| 36 const sync_driver::DataTypeController::TypeMap*, | 36 const sync_driver::DataTypeController::TypeMap*, |
| 37 const sync_driver::DataTypeEncryptionHandler*, | 37 const sync_driver::DataTypeEncryptionHandler*, |
| 38 browser_sync::SyncBackendHost*, | 38 browser_sync::SyncBackendHost*, |
| 39 sync_driver::DataTypeManagerObserver* observer)); | 39 sync_driver::DataTypeManagerObserver* observer)); |
| 40 MOCK_METHOD5(CreateSyncBackendHost, | 40 MOCK_METHOD4(CreateSyncBackendHost, |
| 41 browser_sync::SyncBackendHost*( | 41 browser_sync::SyncBackendHost*( |
| 42 const std::string& name, | 42 const std::string& name, |
| 43 sync_driver::SyncClient* sync_client, | |
| 44 invalidation::InvalidationService* invalidator, | 43 invalidation::InvalidationService* invalidator, |
| 45 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, | 44 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, |
| 46 const base::FilePath& sync_folder)); | 45 const base::FilePath& sync_folder)); |
| 47 | 46 |
| 48 scoped_ptr<sync_driver::LocalDeviceInfoProvider> | 47 scoped_ptr<sync_driver::LocalDeviceInfoProvider> |
| 49 CreateLocalDeviceInfoProvider() override; | 48 CreateLocalDeviceInfoProvider() override; |
| 50 void SetLocalDeviceInfoProvider( | 49 void SetLocalDeviceInfoProvider( |
| 51 scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device); | 50 scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device); |
| 52 | 51 |
| 53 scoped_ptr<syncer::AttachmentService> CreateAttachmentService( | 52 scoped_ptr<syncer::AttachmentService> CreateAttachmentService( |
| (...skipping 15 matching lines...) Expand all Loading... |
| 69 sync_driver::SyncApiComponentFactory::SyncComponents MakeSyncComponents(); | 68 sync_driver::SyncApiComponentFactory::SyncComponents MakeSyncComponents(); |
| 70 | 69 |
| 71 scoped_ptr<sync_driver::AssociatorInterface> model_associator_; | 70 scoped_ptr<sync_driver::AssociatorInterface> model_associator_; |
| 72 scoped_ptr<sync_driver::ChangeProcessor> change_processor_; | 71 scoped_ptr<sync_driver::ChangeProcessor> change_processor_; |
| 73 // LocalDeviceInfoProvider is initially owned by this class, | 72 // LocalDeviceInfoProvider is initially owned by this class, |
| 74 // transferred to caller when CreateLocalDeviceInfoProvider is called. | 73 // transferred to caller when CreateLocalDeviceInfoProvider is called. |
| 75 scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device_; | 74 scoped_ptr<sync_driver::LocalDeviceInfoProvider> local_device_; |
| 76 }; | 75 }; |
| 77 | 76 |
| 78 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ | 77 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_MOCK_H__ |
| OLD | NEW |