| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 bool incognito_; | 340 bool incognito_; |
| 340 scoped_ptr<Profile> incognito_profile_; | 341 scoped_ptr<Profile> incognito_profile_; |
| 341 | 342 |
| 342 // Did the last session exit cleanly? Default is true. | 343 // Did the last session exit cleanly? Default is true. |
| 343 bool last_session_exited_cleanly_; | 344 bool last_session_exited_cleanly_; |
| 344 | 345 |
| 345 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 346 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
| 346 scoped_refptr<content::GeolocationPermissionContext> | 347 scoped_refptr<content::GeolocationPermissionContext> |
| 347 geolocation_permission_context_; | 348 geolocation_permission_context_; |
| 348 | 349 |
| 349 scoped_refptr<content::SpeechInputPreferences> speech_input_preferences_; | 350 scoped_refptr<content::SpeechRecognitionPreferences> |
| 351 speech_recognition_preferences_; |
| 350 | 352 |
| 351 FilePath last_selected_directory_; | 353 FilePath last_selected_directory_; |
| 352 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. | 354 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. |
| 353 | 355 |
| 354 // The Extension Preferences. Only created if CreateExtensionService is | 356 // The Extension Preferences. Only created if CreateExtensionService is |
| 355 // invoked. | 357 // invoked. |
| 356 scoped_ptr<ExtensionPrefs> extension_prefs_; | 358 scoped_ptr<ExtensionPrefs> extension_prefs_; |
| 357 | 359 |
| 358 scoped_ptr<ExtensionService> extension_service_; | 360 scoped_ptr<ExtensionService> extension_service_; |
| 359 | 361 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 382 // testing. | 384 // testing. |
| 383 ProfileDependencyManager* profile_dependency_manager_; | 385 ProfileDependencyManager* profile_dependency_manager_; |
| 384 | 386 |
| 385 scoped_ptr<content::MockResourceContext> resource_context_; | 387 scoped_ptr<content::MockResourceContext> resource_context_; |
| 386 | 388 |
| 387 // Weak pointer to a delegate for indicating that a profile was created. | 389 // Weak pointer to a delegate for indicating that a profile was created. |
| 388 Delegate* delegate_; | 390 Delegate* delegate_; |
| 389 }; | 391 }; |
| 390 | 392 |
| 391 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 393 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| OLD | NEW |