| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/scoped_temp_dir.h" | 13 #include "base/scoped_temp_dir.h" |
| 14 #include "base/timer.h" | 14 #include "base/timer.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "content/browser/appcache/chrome_appcache_service.h" | 16 #include "content/browser/appcache/chrome_appcache_service.h" |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 class MockResourceContext; | 19 class MockResourceContext; |
| 20 class SpeechInputPreferences; | 20 class SpeechRecognitionPreferences; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace history { | 23 namespace history { |
| 24 class TopSites; | 24 class TopSites; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace net { | 27 namespace net { |
| 28 class CookieMonster; | 28 class CookieMonster; |
| 29 class URLRequestContextGetter; | 29 class URLRequestContextGetter; |
| 30 } | 30 } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // TestURLRequestContextGetter class, many tests would find themseleves | 158 // TestURLRequestContextGetter class, many tests would find themseleves |
| 159 // leaking if they called this method without the necessary IO thread. This | 159 // leaking if they called this method without the necessary IO thread. This |
| 160 // getter is currently only capable of returning a Context that helps test | 160 // getter is currently only capable of returning a Context that helps test |
| 161 // the CookieMonster. See implementation comments for more details. | 161 // the CookieMonster. See implementation comments for more details. |
| 162 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 162 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
| 163 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 163 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
| 164 int renderer_child_id) OVERRIDE; | 164 int renderer_child_id) OVERRIDE; |
| 165 virtual content::ResourceContext* GetResourceContext() OVERRIDE; | 165 virtual content::ResourceContext* GetResourceContext() OVERRIDE; |
| 166 virtual content::GeolocationPermissionContext* | 166 virtual content::GeolocationPermissionContext* |
| 167 GetGeolocationPermissionContext() OVERRIDE; | 167 GetGeolocationPermissionContext() OVERRIDE; |
| 168 virtual content::SpeechInputPreferences* GetSpeechInputPreferences() OVERRIDE; | 168 virtual content::SpeechRecognitionPreferences* |
| 169 GetSpeechRecognitionPreferences() OVERRIDE; |
| 169 virtual bool DidLastSessionExitCleanly() OVERRIDE; | 170 virtual bool DidLastSessionExitCleanly() OVERRIDE; |
| 170 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 171 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
| 171 | 172 |
| 172 virtual TestingProfile* AsTestingProfile() OVERRIDE; | 173 virtual TestingProfile* AsTestingProfile() OVERRIDE; |
| 173 virtual std::string GetProfileName() OVERRIDE; | 174 virtual std::string GetProfileName() OVERRIDE; |
| 174 void set_incognito(bool incognito) { incognito_ = incognito; } | 175 void set_incognito(bool incognito) { incognito_ = incognito; } |
| 175 // Assumes ownership. | 176 // Assumes ownership. |
| 176 virtual void SetOffTheRecordProfile(Profile* profile); | 177 virtual void SetOffTheRecordProfile(Profile* profile); |
| 177 virtual Profile* GetOffTheRecordProfile() OVERRIDE; | 178 virtual Profile* GetOffTheRecordProfile() OVERRIDE; |
| 178 virtual void DestroyOffTheRecordProfile() OVERRIDE {} | 179 virtual void DestroyOffTheRecordProfile() OVERRIDE {} |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 bool incognito_; | 345 bool incognito_; |
| 345 scoped_ptr<Profile> incognito_profile_; | 346 scoped_ptr<Profile> incognito_profile_; |
| 346 | 347 |
| 347 // Did the last session exit cleanly? Default is true. | 348 // Did the last session exit cleanly? Default is true. |
| 348 bool last_session_exited_cleanly_; | 349 bool last_session_exited_cleanly_; |
| 349 | 350 |
| 350 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 351 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 351 scoped_refptr<content::GeolocationPermissionContext> | 352 scoped_refptr<content::GeolocationPermissionContext> |
| 352 geolocation_permission_context_; | 353 geolocation_permission_context_; |
| 353 | 354 |
| 354 scoped_refptr<content::SpeechInputPreferences> speech_input_preferences_; | 355 scoped_refptr<content::SpeechRecognitionPreferences> |
| 356 speech_recognition_preferences_; |
| 355 | 357 |
| 356 FilePath last_selected_directory_; | 358 FilePath last_selected_directory_; |
| 357 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. | 359 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. |
| 358 | 360 |
| 359 // The Extension Preferences. Only created if CreateExtensionService is | 361 // The Extension Preferences. Only created if CreateExtensionService is |
| 360 // invoked. | 362 // invoked. |
| 361 scoped_ptr<ExtensionPrefs> extension_prefs_; | 363 scoped_ptr<ExtensionPrefs> extension_prefs_; |
| 362 | 364 |
| 363 scoped_ptr<ExtensionService> extension_service_; | 365 scoped_ptr<ExtensionService> extension_service_; |
| 364 | 366 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 387 // testing. | 389 // testing. |
| 388 ProfileDependencyManager* profile_dependency_manager_; | 390 ProfileDependencyManager* profile_dependency_manager_; |
| 389 | 391 |
| 390 scoped_ptr<content::MockResourceContext> resource_context_; | 392 scoped_ptr<content::MockResourceContext> resource_context_; |
| 391 | 393 |
| 392 // Weak pointer to a delegate for indicating that a profile was created. | 394 // Weak pointer to a delegate for indicating that a profile was created. |
| 393 Delegate* delegate_; | 395 Delegate* delegate_; |
| 394 }; | 396 }; |
| 395 | 397 |
| 396 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 398 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| OLD | NEW |