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 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 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/sync/glue/data_type_controller.h" | 9 #include "chrome/browser/sync/glue/data_type_controller.h" |
10 #include "chrome/browser/sync/glue/data_type_error_handler.h" | 10 #include "chrome/browser/sync/glue/data_type_error_handler.h" |
11 #include "chrome/browser/sync/profile_sync_components_factory.h" | 11 #include "chrome/browser/sync/profile_sync_components_factory.h" |
12 #include "chrome/browser/sync/profile_sync_service.h" | 12 #include "chrome/browser/sync/profile_sync_service.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 | 14 |
15 namespace browser_sync { | 15 namespace browser_sync { |
16 class AssociatorInterface; | 16 class AssociatorInterface; |
17 class ChangeProcessor; | 17 class ChangeProcessor; |
18 } | 18 } |
19 | 19 |
20 class ProfileSyncComponentsFactoryMock : public ProfileSyncComponentsFactory { | 20 class ProfileSyncComponentsFactoryMock : public ProfileSyncComponentsFactory { |
21 public: | 21 public: |
22 ProfileSyncComponentsFactoryMock(); | 22 ProfileSyncComponentsFactoryMock(); |
23 ProfileSyncComponentsFactoryMock( | 23 ProfileSyncComponentsFactoryMock( |
24 browser_sync::AssociatorInterface* model_associator, | 24 browser_sync::AssociatorInterface* model_associator, |
25 browser_sync::ChangeProcessor* change_processor); | 25 browser_sync::ChangeProcessor* change_processor); |
26 virtual ~ProfileSyncComponentsFactoryMock(); | 26 virtual ~ProfileSyncComponentsFactoryMock(); |
27 | 27 |
28 MOCK_METHOD1(RegisterDataTypes, void(ProfileSyncService*)); | 28 MOCK_METHOD1(RegisterDataTypes, void(ProfileSyncService*)); |
29 MOCK_METHOD2(CreateDataTypeManager, | 29 MOCK_METHOD3(CreateDataTypeManager, |
30 browser_sync::DataTypeManager*( | 30 browser_sync::DataTypeManager*( |
31 browser_sync::SyncBackendHost*, | 31 browser_sync::SyncBackendHost*, |
32 const browser_sync::DataTypeController::TypeMap*)); | 32 const browser_sync::DataTypeController::TypeMap*, |
| 33 browser_sync::DataTypeManagerObserver* observer)); |
33 MOCK_METHOD3(CreateGenericChangeProcessor, | 34 MOCK_METHOD3(CreateGenericChangeProcessor, |
34 browser_sync::GenericChangeProcessor*( | 35 browser_sync::GenericChangeProcessor*( |
35 ProfileSyncService* profile_sync_service, | 36 ProfileSyncService* profile_sync_service, |
36 browser_sync::DataTypeErrorHandler* error_handler, | 37 browser_sync::DataTypeErrorHandler* error_handler, |
37 const base::WeakPtr<syncer::SyncableService>& local_service)); | 38 const base::WeakPtr<syncer::SyncableService>& local_service)); |
38 MOCK_METHOD0(CreateSharedChangeProcessor, | 39 MOCK_METHOD0(CreateSharedChangeProcessor, |
39 browser_sync::SharedChangeProcessor*()); | 40 browser_sync::SharedChangeProcessor*()); |
40 MOCK_METHOD1(GetSyncableServiceForType, | 41 MOCK_METHOD1(GetSyncableServiceForType, |
41 base::WeakPtr<syncer::SyncableService>(syncer::ModelType)); | 42 base::WeakPtr<syncer::SyncableService>(syncer::ModelType)); |
42 MOCK_METHOD2(CreateBookmarkSyncComponents, | 43 MOCK_METHOD2(CreateBookmarkSyncComponents, |
(...skipping 19 matching lines...) Expand all Loading... |
62 browser_sync::DataTypeErrorHandler* error_handler)); | 63 browser_sync::DataTypeErrorHandler* error_handler)); |
63 | 64 |
64 private: | 65 private: |
65 SyncComponents MakeSyncComponents(); | 66 SyncComponents MakeSyncComponents(); |
66 | 67 |
67 scoped_ptr<browser_sync::AssociatorInterface> model_associator_; | 68 scoped_ptr<browser_sync::AssociatorInterface> model_associator_; |
68 scoped_ptr<browser_sync::ChangeProcessor> change_processor_; | 69 scoped_ptr<browser_sync::ChangeProcessor> change_processor_; |
69 }; | 70 }; |
70 | 71 |
71 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_MOCK_H__ | 72 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_MOCK_H__ |
OLD | NEW |