| OLD | NEW |
| 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_MOCK_H__ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_MOCK_H__ |
| 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_MOCK_H__ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_MOCK_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/sync/profile_sync_service.h" | 10 #include "chrome/browser/sync/profile_sync_service.h" |
| 11 #include "chrome/browser/sync/profile_sync_components_factory.h" | 11 #include "chrome/browser/sync/profile_sync_components_factory.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 | 13 |
| 14 namespace browser_sync { | 14 namespace browser_sync { |
| 15 class AssociatorInterface; | 15 class AssociatorInterface; |
| 16 class ChangeProcessor; | 16 class ChangeProcessor; |
| 17 } | 17 } |
| 18 | 18 |
| 19 class ProfileSyncComponentsFactoryMock : public ProfileSyncComponentsFactory { | 19 class ProfileSyncComponentsFactoryMock : public ProfileSyncComponentsFactory { |
| 20 public: | 20 public: |
| 21 ProfileSyncComponentsFactoryMock(); | 21 ProfileSyncComponentsFactoryMock(); |
| 22 ProfileSyncComponentsFactoryMock( | 22 ProfileSyncComponentsFactoryMock( |
| 23 browser_sync::AssociatorInterface* model_associator, | 23 browser_sync::AssociatorInterface* model_associator, |
| 24 browser_sync::ChangeProcessor* change_processor); | 24 browser_sync::ChangeProcessor* change_processor); |
| 25 virtual ~ProfileSyncComponentsFactoryMock(); | 25 virtual ~ProfileSyncComponentsFactoryMock(); |
| 26 | 26 |
| 27 MOCK_METHOD0(CreateProfileSyncService, | |
| 28 ProfileSyncService*()); | |
| 29 MOCK_METHOD1(RegisterDataTypes, void(ProfileSyncService*)); | 27 MOCK_METHOD1(RegisterDataTypes, void(ProfileSyncService*)); |
| 30 MOCK_METHOD2(CreateDataTypeManager, | 28 MOCK_METHOD2(CreateDataTypeManager, |
| 31 browser_sync::DataTypeManager*( | 29 browser_sync::DataTypeManager*( |
| 32 browser_sync::SyncBackendHost*, | 30 browser_sync::SyncBackendHost*, |
| 33 const browser_sync::DataTypeController::TypeMap*)); | 31 const browser_sync::DataTypeController::TypeMap*)); |
| 34 MOCK_METHOD3(CreateGenericChangeProcessor, | 32 MOCK_METHOD3(CreateGenericChangeProcessor, |
| 35 browser_sync::GenericChangeProcessor*( | 33 browser_sync::GenericChangeProcessor*( |
| 36 ProfileSyncService* profile_sync_service, | 34 ProfileSyncService* profile_sync_service, |
| 37 browser_sync::UnrecoverableErrorHandler* error_handler, | 35 browser_sync::UnrecoverableErrorHandler* error_handler, |
| 38 const base::WeakPtr<SyncableService>& local_service)); | 36 const base::WeakPtr<SyncableService>& local_service)); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 browser_sync::UnrecoverableErrorHandler* error_handler)); | 85 browser_sync::UnrecoverableErrorHandler* error_handler)); |
| 88 | 86 |
| 89 private: | 87 private: |
| 90 SyncComponents MakeSyncComponents(); | 88 SyncComponents MakeSyncComponents(); |
| 91 | 89 |
| 92 scoped_ptr<browser_sync::AssociatorInterface> model_associator_; | 90 scoped_ptr<browser_sync::AssociatorInterface> model_associator_; |
| 93 scoped_ptr<browser_sync::ChangeProcessor> change_processor_; | 91 scoped_ptr<browser_sync::ChangeProcessor> change_processor_; |
| 94 }; | 92 }; |
| 95 | 93 |
| 96 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_MOCK_H__ | 94 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_MOCK_H__ |
| OLD | NEW |