OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FACTORY_MOCK_H__ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_MOCK_H__ |
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_MOCK_H__ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_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_factory.h" | 11 #include "chrome/browser/sync/profile_sync_factory.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
13 | 13 |
14 class ExtensionSettingsBackend; | |
15 | |
16 namespace browser_sync { | 14 namespace browser_sync { |
17 class AssociatorInterface; | 15 class AssociatorInterface; |
18 class ChangeProcessor; | 16 class ChangeProcessor; |
19 } | 17 } |
20 | 18 |
21 class ProfileSyncFactoryMock : public ProfileSyncFactory { | 19 class ProfileSyncFactoryMock : public ProfileSyncFactory { |
22 public: | 20 public: |
23 ProfileSyncFactoryMock(); | 21 ProfileSyncFactoryMock(); |
24 ProfileSyncFactoryMock( | 22 ProfileSyncFactoryMock( |
25 browser_sync::AssociatorInterface* model_associator, | 23 browser_sync::AssociatorInterface* model_associator, |
(...skipping 24 matching lines...) Expand all Loading... |
50 browser_sync::UnrecoverableErrorHandler* error_handler)); | 48 browser_sync::UnrecoverableErrorHandler* error_handler)); |
51 MOCK_CONST_METHOD1(GetAutofillProfileSyncableService, | 49 MOCK_CONST_METHOD1(GetAutofillProfileSyncableService, |
52 base::WeakPtr<SyncableService>( | 50 base::WeakPtr<SyncableService>( |
53 WebDataService* web_data_service)); | 51 WebDataService* web_data_service)); |
54 MOCK_METHOD2(CreateBookmarkSyncComponents, | 52 MOCK_METHOD2(CreateBookmarkSyncComponents, |
55 SyncComponents(ProfileSyncService* profile_sync_service, | 53 SyncComponents(ProfileSyncService* profile_sync_service, |
56 browser_sync::UnrecoverableErrorHandler* error_handler)); | 54 browser_sync::UnrecoverableErrorHandler* error_handler)); |
57 MOCK_METHOD2(CreateExtensionSyncComponents, | 55 MOCK_METHOD2(CreateExtensionSyncComponents, |
58 SyncComponents(ProfileSyncService* profile_sync_service, | 56 SyncComponents(ProfileSyncService* profile_sync_service, |
59 browser_sync::UnrecoverableErrorHandler* error_handler)); | 57 browser_sync::UnrecoverableErrorHandler* error_handler)); |
60 MOCK_METHOD3(CreateExtensionSettingSyncComponents, | 58 MOCK_METHOD4(CreateExtensionOrAppSettingSyncComponents, |
61 SyncComponents(ExtensionSettingsBackend* extension_settings_backend, | 59 SyncComponents(syncable::ModelType model_type, |
| 60 SyncableService* settings_service, |
62 ProfileSyncService* profile_sync_service, | 61 ProfileSyncService* profile_sync_service, |
63 browser_sync::UnrecoverableErrorHandler* error_handler)); | 62 browser_sync::UnrecoverableErrorHandler* error_handler)); |
64 MOCK_METHOD3(CreatePasswordSyncComponents, | 63 MOCK_METHOD3(CreatePasswordSyncComponents, |
65 SyncComponents( | 64 SyncComponents( |
66 ProfileSyncService* profile_sync_service, | 65 ProfileSyncService* profile_sync_service, |
67 PasswordStore* password_store, | 66 PasswordStore* password_store, |
68 browser_sync::UnrecoverableErrorHandler* error_handler)); | 67 browser_sync::UnrecoverableErrorHandler* error_handler)); |
69 MOCK_METHOD2(CreatePreferenceSyncComponents, | 68 MOCK_METHOD2(CreatePreferenceSyncComponents, |
70 SyncComponents(ProfileSyncService* profile_sync_service, | 69 SyncComponents(ProfileSyncService* profile_sync_service, |
71 browser_sync::UnrecoverableErrorHandler* error_handler)); | 70 browser_sync::UnrecoverableErrorHandler* error_handler)); |
(...skipping 18 matching lines...) Expand all Loading... |
90 browser_sync::UnrecoverableErrorHandler* error_handler)); | 89 browser_sync::UnrecoverableErrorHandler* error_handler)); |
91 | 90 |
92 private: | 91 private: |
93 SyncComponents MakeSyncComponents(); | 92 SyncComponents MakeSyncComponents(); |
94 | 93 |
95 scoped_ptr<browser_sync::AssociatorInterface> model_associator_; | 94 scoped_ptr<browser_sync::AssociatorInterface> model_associator_; |
96 scoped_ptr<browser_sync::ChangeProcessor> change_processor_; | 95 scoped_ptr<browser_sync::ChangeProcessor> change_processor_; |
97 }; | 96 }; |
98 | 97 |
99 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_MOCK_H__ | 98 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_MOCK_H__ |
OLD | NEW |