| 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 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_ | 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ | 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: | 181 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: |
| 182 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because | 182 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because |
| 183 // of the special memory management considerations for the | 183 // of the special memory management considerations for the |
| 184 // TestURLRequestContextGetter class, many tests would find themseleves | 184 // TestURLRequestContextGetter class, many tests would find themseleves |
| 185 // leaking if they called this method without the necessary IO thread. This | 185 // leaking if they called this method without the necessary IO thread. This |
| 186 // getter is currently only capable of returning a Context that helps test | 186 // getter is currently only capable of returning a Context that helps test |
| 187 // the CookieMonster. See implementation comments for more details. | 187 // the CookieMonster. See implementation comments for more details. |
| 188 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 188 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
| 189 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 189 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
| 190 int renderer_child_id) OVERRIDE; | 190 int renderer_child_id) OVERRIDE; |
| 191 virtual content::ResourceContext* GetResourceContext() OVERRIDE; | 191 virtual content::ResourceContext* GetResourceContext( |
| 192 content::SiteInstance* instance) OVERRIDE; |
| 192 virtual content::GeolocationPermissionContext* | 193 virtual content::GeolocationPermissionContext* |
| 193 GetGeolocationPermissionContext() OVERRIDE; | 194 GetGeolocationPermissionContext() OVERRIDE; |
| 194 virtual content::SpeechRecognitionPreferences* | 195 virtual content::SpeechRecognitionPreferences* |
| 195 GetSpeechRecognitionPreferences() OVERRIDE; | 196 GetSpeechRecognitionPreferences() OVERRIDE; |
| 196 virtual bool DidLastSessionExitCleanly() OVERRIDE; | 197 virtual bool DidLastSessionExitCleanly() OVERRIDE; |
| 197 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 198 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
| 198 | 199 |
| 199 virtual TestingProfile* AsTestingProfile() OVERRIDE; | 200 virtual TestingProfile* AsTestingProfile() OVERRIDE; |
| 200 virtual std::string GetProfileName() OVERRIDE; | 201 virtual std::string GetProfileName() OVERRIDE; |
| 201 void set_incognito(bool incognito) { incognito_ = incognito; } | 202 void set_incognito(bool incognito) { incognito_ = incognito; } |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 // testing. | 358 // testing. |
| 358 ProfileDependencyManager* profile_dependency_manager_; | 359 ProfileDependencyManager* profile_dependency_manager_; |
| 359 | 360 |
| 360 scoped_ptr<content::MockResourceContext> resource_context_; | 361 scoped_ptr<content::MockResourceContext> resource_context_; |
| 361 | 362 |
| 362 // Weak pointer to a delegate for indicating that a profile was created. | 363 // Weak pointer to a delegate for indicating that a profile was created. |
| 363 Delegate* delegate_; | 364 Delegate* delegate_; |
| 364 }; | 365 }; |
| 365 | 366 |
| 366 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 367 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| OLD | NEW |