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_ |
11 #define CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ | 11 #define CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ |
12 | 12 |
13 #include <stdint.h> | 13 #include <stdint.h> |
14 | 14 |
15 #include <memory> | 15 #include <memory> |
16 #include <string> | 16 #include <string> |
17 | 17 |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
22 #include "chrome/browser/browser_process_platform_part.h" | 22 #include "chrome/browser/browser_process_platform_part.h" |
| 23 #include "extensions/features/features.h" |
23 #include "printing/features/features.h" | 24 #include "printing/features/features.h" |
24 | 25 |
25 class BackgroundModeManager; | 26 class BackgroundModeManager; |
26 class CRLSetFetcher; | 27 class CRLSetFetcher; |
27 class IOThread; | 28 class IOThread; |
28 class MHTMLGenerationManager; | 29 class MHTMLGenerationManager; |
29 class NotificationPlatformBridge; | 30 class NotificationPlatformBridge; |
30 class NotificationUIManager; | 31 class NotificationUIManager; |
31 class PrefService; | 32 class PrefService; |
32 class WatchDogThread; | 33 class WatchDogThread; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 #endif | 189 #endif |
189 | 190 |
190 // The following objects are not owned by TestingBrowserProcess: | 191 // The following objects are not owned by TestingBrowserProcess: |
191 PrefService* local_state_; | 192 PrefService* local_state_; |
192 IOThread* io_thread_; | 193 IOThread* io_thread_; |
193 net::URLRequestContextGetter* system_request_context_; | 194 net::URLRequestContextGetter* system_request_context_; |
194 rappor::RapporService* rappor_service_; | 195 rappor::RapporService* rappor_service_; |
195 | 196 |
196 std::unique_ptr<BrowserProcessPlatformPart> platform_part_; | 197 std::unique_ptr<BrowserProcessPlatformPart> platform_part_; |
197 | 198 |
198 #if defined(ENABLE_EXTENSIONS) | 199 #if BUILDFLAG(ENABLE_EXTENSIONS) |
199 std::unique_ptr<MediaFileSystemRegistry> media_file_system_registry_; | 200 std::unique_ptr<MediaFileSystemRegistry> media_file_system_registry_; |
200 | 201 |
201 std::unique_ptr<extensions::ExtensionsBrowserClient> | 202 std::unique_ptr<extensions::ExtensionsBrowserClient> |
202 extensions_browser_client_; | 203 extensions_browser_client_; |
203 #endif | 204 #endif |
204 | 205 |
205 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); | 206 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); |
206 }; | 207 }; |
207 | 208 |
208 // RAII (resource acquisition is initialization) for TestingBrowserProcess. | 209 // RAII (resource acquisition is initialization) for TestingBrowserProcess. |
(...skipping 13 matching lines...) Expand all Loading... |
222 class TestingBrowserProcessInitializer { | 223 class TestingBrowserProcessInitializer { |
223 public: | 224 public: |
224 TestingBrowserProcessInitializer(); | 225 TestingBrowserProcessInitializer(); |
225 ~TestingBrowserProcessInitializer(); | 226 ~TestingBrowserProcessInitializer(); |
226 | 227 |
227 private: | 228 private: |
228 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); | 229 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); |
229 }; | 230 }; |
230 | 231 |
231 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ | 232 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ |
OLD | NEW |