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 // An implementation of BrowserProcess for unit tests that fails for most | 5 // An implementation of BrowserProcess for unit tests that fails for most |
6 // services. By preventing creation of services, we reduce dependencies and | 6 // services. By preventing creation of services, we reduce dependencies and |
7 // keep the profile clean. Clients of this class must handle the NULL return | 7 // keep the profile clean. Clients of this class must handle the NULL return |
8 // value, however. | 8 // value, however. |
9 | 9 |
10 #ifndef CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ | 10 #ifndef CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void SetLocalState(PrefService* local_state); | 134 void SetLocalState(PrefService* local_state); |
135 void SetProfileManager(ProfileManager* profile_manager); | 135 void SetProfileManager(ProfileManager* profile_manager); |
136 void SetIOThread(IOThread* io_thread); | 136 void SetIOThread(IOThread* io_thread); |
137 void SetSafeBrowsingService(safe_browsing::SafeBrowsingService* sb_service); | 137 void SetSafeBrowsingService(safe_browsing::SafeBrowsingService* sb_service); |
138 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); | 138 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); |
139 void SetNotificationUIManager( | 139 void SetNotificationUIManager( |
140 scoped_ptr<NotificationUIManager> notification_ui_manager); | 140 scoped_ptr<NotificationUIManager> notification_ui_manager); |
141 void SetRapporService(rappor::RapporService* rappor_service); | 141 void SetRapporService(rappor::RapporService* rappor_service); |
142 void ShutdownBrowserPolicyConnector(); | 142 void ShutdownBrowserPolicyConnector(); |
143 | 143 |
| 144 unsigned int module_ref_count() const { return module_ref_count_; } |
| 145 |
144 private: | 146 private: |
145 // See CreateInstance() and DestoryInstance() above. | 147 // See CreateInstance() and DestoryInstance() above. |
146 TestingBrowserProcess(); | 148 TestingBrowserProcess(); |
147 ~TestingBrowserProcess() override; | 149 ~TestingBrowserProcess() override; |
148 | 150 |
149 scoped_ptr<content::NotificationService> notification_service_; | 151 scoped_ptr<content::NotificationService> notification_service_; |
150 unsigned int module_ref_count_; | 152 unsigned int module_ref_count_; |
151 std::string app_locale_; | 153 std::string app_locale_; |
152 | 154 |
153 #if defined(ENABLE_CONFIGURATION_POLICY) | 155 #if defined(ENABLE_CONFIGURATION_POLICY) |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 class TestingBrowserProcessInitializer { | 209 class TestingBrowserProcessInitializer { |
208 public: | 210 public: |
209 TestingBrowserProcessInitializer(); | 211 TestingBrowserProcessInitializer(); |
210 ~TestingBrowserProcessInitializer(); | 212 ~TestingBrowserProcessInitializer(); |
211 | 213 |
212 private: | 214 private: |
213 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); | 215 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); |
214 }; | 216 }; |
215 | 217 |
216 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ | 218 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ |
OLD | NEW |