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 16 matching lines...) Expand all Loading... |
27 class WatchDogThread; | 27 class WatchDogThread; |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 class NotificationService; | 30 class NotificationService; |
31 } | 31 } |
32 | 32 |
33 namespace extensions { | 33 namespace extensions { |
34 class ExtensionsBrowserClient; | 34 class ExtensionsBrowserClient; |
35 } | 35 } |
36 | 36 |
| 37 namespace gcm { |
| 38 class GCMDriver; |
| 39 } |
| 40 |
37 namespace policy { | 41 namespace policy { |
38 class BrowserPolicyConnector; | 42 class BrowserPolicyConnector; |
39 class PolicyService; | 43 class PolicyService; |
40 } | 44 } |
41 | 45 |
42 namespace prerender { | 46 namespace prerender { |
43 class PrerenderTracker; | 47 class PrerenderTracker; |
44 } | 48 } |
45 | 49 |
46 class TestingBrowserProcess : public BrowserProcess { | 50 class TestingBrowserProcess : public BrowserProcess { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 pnacl_component_installer() OVERRIDE; | 117 pnacl_component_installer() OVERRIDE; |
114 virtual MediaFileSystemRegistry* media_file_system_registry() OVERRIDE; | 118 virtual MediaFileSystemRegistry* media_file_system_registry() OVERRIDE; |
115 virtual bool created_local_state() const OVERRIDE; | 119 virtual bool created_local_state() const OVERRIDE; |
116 | 120 |
117 #if defined(ENABLE_WEBRTC) | 121 #if defined(ENABLE_WEBRTC) |
118 virtual WebRtcLogUploader* webrtc_log_uploader() OVERRIDE; | 122 virtual WebRtcLogUploader* webrtc_log_uploader() OVERRIDE; |
119 #endif | 123 #endif |
120 | 124 |
121 virtual network_time::NetworkTimeTracker* network_time_tracker() OVERRIDE; | 125 virtual network_time::NetworkTimeTracker* network_time_tracker() OVERRIDE; |
122 | 126 |
| 127 virtual gcm::GCMDriver* gcm_driver() OVERRIDE; |
| 128 |
123 // Set the local state for tests. Consumer is responsible for cleaning it up | 129 // Set the local state for tests. Consumer is responsible for cleaning it up |
124 // afterwards (using ScopedTestingLocalState, for example). | 130 // afterwards (using ScopedTestingLocalState, for example). |
125 void SetLocalState(PrefService* local_state); | 131 void SetLocalState(PrefService* local_state); |
126 void SetProfileManager(ProfileManager* profile_manager); | 132 void SetProfileManager(ProfileManager* profile_manager); |
127 void SetIOThread(IOThread* io_thread); | 133 void SetIOThread(IOThread* io_thread); |
128 void SetBrowserPolicyConnector(policy::BrowserPolicyConnector* connector); | 134 void SetBrowserPolicyConnector(policy::BrowserPolicyConnector* connector); |
129 void SetSafeBrowsingService(SafeBrowsingService* sb_service); | 135 void SetSafeBrowsingService(SafeBrowsingService* sb_service); |
130 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); | 136 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); |
131 | 137 |
132 private: | 138 private: |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 class TestingBrowserProcessInitializer { | 200 class TestingBrowserProcessInitializer { |
195 public: | 201 public: |
196 TestingBrowserProcessInitializer(); | 202 TestingBrowserProcessInitializer(); |
197 ~TestingBrowserProcessInitializer(); | 203 ~TestingBrowserProcessInitializer(); |
198 | 204 |
199 private: | 205 private: |
200 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); | 206 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); |
201 }; | 207 }; |
202 | 208 |
203 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ | 209 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ |
OLD | NEW |