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/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 GetGeolocationPermissionContext() OVERRIDE; | 203 GetGeolocationPermissionContext() OVERRIDE; |
204 virtual content::SpeechRecognitionPreferences* | 204 virtual content::SpeechRecognitionPreferences* |
205 GetSpeechRecognitionPreferences() OVERRIDE; | 205 GetSpeechRecognitionPreferences() OVERRIDE; |
206 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 206 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
207 | 207 |
208 virtual TestingProfile* AsTestingProfile() OVERRIDE; | 208 virtual TestingProfile* AsTestingProfile() OVERRIDE; |
209 virtual std::string GetProfileName() OVERRIDE; | 209 virtual std::string GetProfileName() OVERRIDE; |
210 void set_incognito(bool incognito) { incognito_ = incognito; } | 210 void set_incognito(bool incognito) { incognito_ = incognito; } |
211 // Assumes ownership. | 211 // Assumes ownership. |
212 virtual void SetOffTheRecordProfile(Profile* profile); | 212 virtual void SetOffTheRecordProfile(Profile* profile); |
| 213 virtual void SetOriginalProfile(Profile* profile); |
213 virtual Profile* GetOffTheRecordProfile() OVERRIDE; | 214 virtual Profile* GetOffTheRecordProfile() OVERRIDE; |
214 virtual void DestroyOffTheRecordProfile() OVERRIDE {} | 215 virtual void DestroyOffTheRecordProfile() OVERRIDE {} |
215 virtual bool HasOffTheRecordProfile() OVERRIDE; | 216 virtual bool HasOffTheRecordProfile() OVERRIDE; |
216 virtual Profile* GetOriginalProfile() OVERRIDE; | 217 virtual Profile* GetOriginalProfile() OVERRIDE; |
217 virtual ExtensionService* GetExtensionService() OVERRIDE; | 218 virtual ExtensionService* GetExtensionService() OVERRIDE; |
218 void SetExtensionSpecialStoragePolicy( | 219 void SetExtensionSpecialStoragePolicy( |
219 ExtensionSpecialStoragePolicy* extension_special_storage_policy); | 220 ExtensionSpecialStoragePolicy* extension_special_storage_policy); |
220 virtual ExtensionSpecialStoragePolicy* | 221 virtual ExtensionSpecialStoragePolicy* |
221 GetExtensionSpecialStoragePolicy() OVERRIDE; | 222 GetExtensionSpecialStoragePolicy() OVERRIDE; |
222 // The CookieMonster will only be returned if a Context has been created. Do | 223 // The CookieMonster will only be returned if a Context has been created. Do |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 334 |
334 // Internally, this is a TestURLRequestContextGetter that creates a dummy | 335 // Internally, this is a TestURLRequestContextGetter that creates a dummy |
335 // request context. Currently, only the CookieMonster is hooked up. | 336 // request context. Currently, only the CookieMonster is hooked up. |
336 scoped_refptr<net::URLRequestContextGetter> request_context_; | 337 scoped_refptr<net::URLRequestContextGetter> request_context_; |
337 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; | 338 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; |
338 | 339 |
339 std::wstring id_; | 340 std::wstring id_; |
340 | 341 |
341 bool incognito_; | 342 bool incognito_; |
342 scoped_ptr<Profile> incognito_profile_; | 343 scoped_ptr<Profile> incognito_profile_; |
| 344 Profile* original_profile_; |
343 | 345 |
344 // Did the last session exit cleanly? Default is true. | 346 // Did the last session exit cleanly? Default is true. |
345 bool last_session_exited_cleanly_; | 347 bool last_session_exited_cleanly_; |
346 | 348 |
347 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 349 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
348 | 350 |
349 base::FilePath last_selected_directory_; | 351 base::FilePath last_selected_directory_; |
350 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. | 352 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. |
351 | 353 |
352 scoped_refptr<ExtensionSpecialStoragePolicy> | 354 scoped_refptr<ExtensionSpecialStoragePolicy> |
(...skipping 15 matching lines...) Expand all Loading... |
368 // testing. | 370 // testing. |
369 ProfileDependencyManager* profile_dependency_manager_; | 371 ProfileDependencyManager* profile_dependency_manager_; |
370 | 372 |
371 scoped_ptr<content::MockResourceContext> resource_context_; | 373 scoped_ptr<content::MockResourceContext> resource_context_; |
372 | 374 |
373 // Weak pointer to a delegate for indicating that a profile was created. | 375 // Weak pointer to a delegate for indicating that a profile was created. |
374 Delegate* delegate_; | 376 Delegate* delegate_; |
375 }; | 377 }; |
376 | 378 |
377 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 379 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
OLD | NEW |