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_TEST_TESTING_PROFILE_H_ | 5 #ifndef CHROME_TEST_TESTING_PROFILE_H_ |
6 #define CHROME_TEST_TESTING_PROFILE_H_ | 6 #define CHROME_TEST_TESTING_PROFILE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 // Returns a testing ContextGetter (if one has been created via | 195 // Returns a testing ContextGetter (if one has been created via |
196 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: | 196 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: |
197 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because | 197 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because |
198 // of the special memory management considerations for the | 198 // of the special memory management considerations for the |
199 // TestURLRequestContextGetter class, many tests would find themseleves | 199 // TestURLRequestContextGetter class, many tests would find themseleves |
200 // leaking if they called this method without the necessary IO thread. This | 200 // leaking if they called this method without the necessary IO thread. This |
201 // getter is currently only capable of returning a Context that helps test | 201 // getter is currently only capable of returning a Context that helps test |
202 // the CookieMonster. See implementation comments for more details. | 202 // the CookieMonster. See implementation comments for more details. |
203 virtual URLRequestContextGetter* GetRequestContext(); | 203 virtual URLRequestContextGetter* GetRequestContext(); |
| 204 virtual URLRequestContextGetter* GetRequestContextForPossibleApp( |
| 205 const Extension* installed_app); |
204 void CreateRequestContext(); | 206 void CreateRequestContext(); |
205 // Clears out the created request context (which must be done before shutting | 207 // Clears out the created request context (which must be done before shutting |
206 // down the IO thread to avoid leaks). | 208 // down the IO thread to avoid leaks). |
207 void ResetRequestContext(); | 209 void ResetRequestContext(); |
208 | 210 |
209 virtual URLRequestContextGetter* GetRequestContextForMedia(); | 211 virtual URLRequestContextGetter* GetRequestContextForMedia(); |
210 virtual URLRequestContextGetter* GetRequestContextForExtensions(); | 212 virtual URLRequestContextGetter* GetRequestContextForExtensions(); |
| 213 virtual URLRequestContextGetter* GetRequestContextForIsolatedApp( |
| 214 std::string app_id); |
211 | 215 |
212 virtual net::SSLConfigService* GetSSLConfigService(); | 216 virtual net::SSLConfigService* GetSSLConfigService(); |
213 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher(); | 217 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher(); |
214 virtual FindBarState* GetFindBarState(); | 218 virtual FindBarState* GetFindBarState(); |
215 virtual HostContentSettingsMap* GetHostContentSettingsMap(); | 219 virtual HostContentSettingsMap* GetHostContentSettingsMap(); |
216 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap(); | 220 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap(); |
217 virtual GeolocationPermissionContext* GetGeolocationPermissionContext(); | 221 virtual GeolocationPermissionContext* GetGeolocationPermissionContext(); |
218 virtual HostZoomMap* GetHostZoomMap(); | 222 virtual HostZoomMap* GetHostZoomMap(); |
219 void set_session_service(SessionService* session_service); | 223 void set_session_service(SessionService* session_service); |
220 virtual SessionService* GetSessionService(); | 224 virtual SessionService* GetSessionService(); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 explicit DerivedTestingProfile(Profile* profile); | 421 explicit DerivedTestingProfile(Profile* profile); |
418 virtual ~DerivedTestingProfile(); | 422 virtual ~DerivedTestingProfile(); |
419 | 423 |
420 virtual ProfileId GetRuntimeId(); | 424 virtual ProfileId GetRuntimeId(); |
421 | 425 |
422 protected: | 426 protected: |
423 Profile* original_profile_; | 427 Profile* original_profile_; |
424 }; | 428 }; |
425 | 429 |
426 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 430 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
OLD | NEW |