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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; | 111 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; |
112 virtual component_updater::PnaclComponentInstaller* | 112 virtual component_updater::PnaclComponentInstaller* |
113 pnacl_component_installer() OVERRIDE; | 113 pnacl_component_installer() OVERRIDE; |
114 virtual MediaFileSystemRegistry* media_file_system_registry() OVERRIDE; | 114 virtual MediaFileSystemRegistry* media_file_system_registry() OVERRIDE; |
115 virtual bool created_local_state() const OVERRIDE; | 115 virtual bool created_local_state() const OVERRIDE; |
116 | 116 |
117 #if defined(ENABLE_WEBRTC) | 117 #if defined(ENABLE_WEBRTC) |
118 virtual WebRtcLogUploader* webrtc_log_uploader() OVERRIDE; | 118 virtual WebRtcLogUploader* webrtc_log_uploader() OVERRIDE; |
119 #endif | 119 #endif |
120 | 120 |
| 121 virtual NetworkTimeTracker* network_time_tracker() OVERRIDE; |
| 122 |
121 // Set the local state for tests. Consumer is responsible for cleaning it up | 123 // Set the local state for tests. Consumer is responsible for cleaning it up |
122 // afterwards (using ScopedTestingLocalState, for example). | 124 // afterwards (using ScopedTestingLocalState, for example). |
123 void SetLocalState(PrefService* local_state); | 125 void SetLocalState(PrefService* local_state); |
124 void SetProfileManager(ProfileManager* profile_manager); | 126 void SetProfileManager(ProfileManager* profile_manager); |
125 void SetIOThread(IOThread* io_thread); | 127 void SetIOThread(IOThread* io_thread); |
126 void SetBrowserPolicyConnector(policy::BrowserPolicyConnector* connector); | 128 void SetBrowserPolicyConnector(policy::BrowserPolicyConnector* connector); |
127 void SetSafeBrowsingService(SafeBrowsingService* sb_service); | 129 void SetSafeBrowsingService(SafeBrowsingService* sb_service); |
128 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); | 130 void SetSystemRequestContext(net::URLRequestContextGetter* context_getter); |
129 | 131 |
130 private: | 132 private: |
(...skipping 23 matching lines...) Expand all Loading... |
154 #endif | 156 #endif |
155 | 157 |
156 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; | 158 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; |
157 scoped_refptr<SafeBrowsingService> sb_service_; | 159 scoped_refptr<SafeBrowsingService> sb_service_; |
158 #endif // !defined(OS_IOS) | 160 #endif // !defined(OS_IOS) |
159 | 161 |
160 #if !defined(OS_IOS) && !defined(OS_ANDROID) | 162 #if !defined(OS_IOS) && !defined(OS_ANDROID) |
161 scoped_ptr<MediaFileSystemRegistry> media_file_system_registry_; | 163 scoped_ptr<MediaFileSystemRegistry> media_file_system_registry_; |
162 #endif | 164 #endif |
163 | 165 |
| 166 scoped_ptr<NetworkTimeTracker> network_time_tracker_; |
| 167 |
164 // The following objects are not owned by TestingBrowserProcess: | 168 // The following objects are not owned by TestingBrowserProcess: |
165 PrefService* local_state_; | 169 PrefService* local_state_; |
166 IOThread* io_thread_; | 170 IOThread* io_thread_; |
167 net::URLRequestContextGetter* system_request_context_; | 171 net::URLRequestContextGetter* system_request_context_; |
168 | 172 |
169 scoped_ptr<BrowserProcessPlatformPart> platform_part_; | 173 scoped_ptr<BrowserProcessPlatformPart> platform_part_; |
170 | 174 |
171 scoped_ptr<extensions::ExtensionsBrowserClient> extensions_browser_client_; | 175 scoped_ptr<extensions::ExtensionsBrowserClient> extensions_browser_client_; |
172 | 176 |
173 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); | 177 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); |
(...skipping 16 matching lines...) Expand all Loading... |
190 class TestingBrowserProcessInitializer { | 194 class TestingBrowserProcessInitializer { |
191 public: | 195 public: |
192 TestingBrowserProcessInitializer(); | 196 TestingBrowserProcessInitializer(); |
193 ~TestingBrowserProcessInitializer(); | 197 ~TestingBrowserProcessInitializer(); |
194 | 198 |
195 private: | 199 private: |
196 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); | 200 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcessInitializer); |
197 }; | 201 }; |
198 | 202 |
199 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ | 203 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ |
OLD | NEW |