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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 GetGeolocationPermissionContext() OVERRIDE; | 197 GetGeolocationPermissionContext() OVERRIDE; |
198 virtual content::SpeechRecognitionPreferences* | 198 virtual content::SpeechRecognitionPreferences* |
199 GetSpeechRecognitionPreferences() OVERRIDE; | 199 GetSpeechRecognitionPreferences() OVERRIDE; |
200 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 200 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
201 | 201 |
202 virtual TestingProfile* AsTestingProfile() OVERRIDE; | 202 virtual TestingProfile* AsTestingProfile() OVERRIDE; |
203 virtual std::string GetProfileName() OVERRIDE; | 203 virtual std::string GetProfileName() OVERRIDE; |
204 void set_incognito(bool incognito) { incognito_ = incognito; } | 204 void set_incognito(bool incognito) { incognito_ = incognito; } |
205 // Assumes ownership. | 205 // Assumes ownership. |
206 virtual void SetOffTheRecordProfile(Profile* profile); | 206 virtual void SetOffTheRecordProfile(Profile* profile); |
| 207 virtual void SetOriginalProfile(Profile* profile); |
207 virtual Profile* GetOffTheRecordProfile() OVERRIDE; | 208 virtual Profile* GetOffTheRecordProfile() OVERRIDE; |
208 virtual void DestroyOffTheRecordProfile() OVERRIDE {} | 209 virtual void DestroyOffTheRecordProfile() OVERRIDE {} |
209 virtual bool HasOffTheRecordProfile() OVERRIDE; | 210 virtual bool HasOffTheRecordProfile() OVERRIDE; |
210 virtual Profile* GetOriginalProfile() OVERRIDE; | 211 virtual Profile* GetOriginalProfile() OVERRIDE; |
211 virtual ExtensionService* GetExtensionService() OVERRIDE; | 212 virtual ExtensionService* GetExtensionService() OVERRIDE; |
212 void SetExtensionSpecialStoragePolicy( | 213 void SetExtensionSpecialStoragePolicy( |
213 ExtensionSpecialStoragePolicy* extension_special_storage_policy); | 214 ExtensionSpecialStoragePolicy* extension_special_storage_policy); |
214 virtual ExtensionSpecialStoragePolicy* | 215 virtual ExtensionSpecialStoragePolicy* |
215 GetExtensionSpecialStoragePolicy() OVERRIDE; | 216 GetExtensionSpecialStoragePolicy() OVERRIDE; |
216 // The CookieMonster will only be returned if a Context has been created. Do | 217 // The CookieMonster will only be returned if a Context has been created. Do |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 321 |
321 // Internally, this is a TestURLRequestContextGetter that creates a dummy | 322 // Internally, this is a TestURLRequestContextGetter that creates a dummy |
322 // request context. Currently, only the CookieMonster is hooked up. | 323 // request context. Currently, only the CookieMonster is hooked up. |
323 scoped_refptr<net::URLRequestContextGetter> request_context_; | 324 scoped_refptr<net::URLRequestContextGetter> request_context_; |
324 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; | 325 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; |
325 | 326 |
326 std::wstring id_; | 327 std::wstring id_; |
327 | 328 |
328 bool incognito_; | 329 bool incognito_; |
329 scoped_ptr<Profile> incognito_profile_; | 330 scoped_ptr<Profile> incognito_profile_; |
| 331 Profile* original_profile_; |
330 | 332 |
331 // Did the last session exit cleanly? Default is true. | 333 // Did the last session exit cleanly? Default is true. |
332 bool last_session_exited_cleanly_; | 334 bool last_session_exited_cleanly_; |
333 | 335 |
334 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; | 336 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; |
335 | 337 |
336 FilePath last_selected_directory_; | 338 FilePath last_selected_directory_; |
337 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. | 339 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. |
338 | 340 |
339 scoped_refptr<ExtensionSpecialStoragePolicy> | 341 scoped_refptr<ExtensionSpecialStoragePolicy> |
(...skipping 15 matching lines...) Expand all Loading... |
355 // testing. | 357 // testing. |
356 ProfileDependencyManager* profile_dependency_manager_; | 358 ProfileDependencyManager* profile_dependency_manager_; |
357 | 359 |
358 scoped_ptr<content::MockResourceContext> resource_context_; | 360 scoped_ptr<content::MockResourceContext> resource_context_; |
359 | 361 |
360 // Weak pointer to a delegate for indicating that a profile was created. | 362 // Weak pointer to a delegate for indicating that a profile was created. |
361 Delegate* delegate_; | 363 Delegate* delegate_; |
362 }; | 364 }; |
363 | 365 |
364 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 366 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
OLD | NEW |