| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 virtual Profile* GetOriginalProfile() OVERRIDE; | 216 virtual Profile* GetOriginalProfile() OVERRIDE; |
| 217 virtual VisitedLinkMaster* GetVisitedLinkMaster() OVERRIDE; | 217 virtual VisitedLinkMaster* GetVisitedLinkMaster() OVERRIDE; |
| 218 virtual ExtensionService* GetExtensionService() OVERRIDE; | 218 virtual ExtensionService* GetExtensionService() OVERRIDE; |
| 219 virtual extensions::UserScriptMaster* GetUserScriptMaster() OVERRIDE; | 219 virtual extensions::UserScriptMaster* GetUserScriptMaster() OVERRIDE; |
| 220 virtual ExtensionProcessManager* GetExtensionProcessManager() OVERRIDE; | 220 virtual ExtensionProcessManager* GetExtensionProcessManager() OVERRIDE; |
| 221 virtual extensions::EventRouter* GetExtensionEventRouter() OVERRIDE; | 221 virtual extensions::EventRouter* GetExtensionEventRouter() OVERRIDE; |
| 222 void SetExtensionSpecialStoragePolicy( | 222 void SetExtensionSpecialStoragePolicy( |
| 223 ExtensionSpecialStoragePolicy* extension_special_storage_policy); | 223 ExtensionSpecialStoragePolicy* extension_special_storage_policy); |
| 224 virtual ExtensionSpecialStoragePolicy* | 224 virtual ExtensionSpecialStoragePolicy* |
| 225 GetExtensionSpecialStoragePolicy() OVERRIDE; | 225 GetExtensionSpecialStoragePolicy() OVERRIDE; |
| 226 virtual FaviconService* GetFaviconService(ServiceAccessType access) OVERRIDE; |
| 226 // The CookieMonster will only be returned if a Context has been created. Do | 227 // The CookieMonster will only be returned if a Context has been created. Do |
| 227 // this by calling CreateRequestContext(). See the note at GetRequestContext | 228 // this by calling CreateRequestContext(). See the note at GetRequestContext |
| 228 // for more information. | 229 // for more information. |
| 229 net::CookieMonster* GetCookieMonster(); | 230 net::CookieMonster* GetCookieMonster(); |
| 230 | 231 |
| 231 virtual policy::UserCloudPolicyManager* GetUserCloudPolicyManager() OVERRIDE; | 232 virtual policy::UserCloudPolicyManager* GetUserCloudPolicyManager() OVERRIDE; |
| 232 virtual policy::PolicyService* GetPolicyService() OVERRIDE; | 233 virtual policy::PolicyService* GetPolicyService() OVERRIDE; |
| 233 // Sets the profile's PrefService. If a pref service hasn't been explicitly | 234 // Sets the profile's PrefService. If a pref service hasn't been explicitly |
| 234 // set GetPrefs creates one, so normally you need not invoke this. If you need | 235 // set GetPrefs creates one, so normally you need not invoke this. If you need |
| 235 // to set a pref service you must invoke this before GetPrefs. | 236 // to set a pref service you must invoke this before GetPrefs. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 private: | 308 private: |
| 308 // Creates a temporary directory for use by this profile. | 309 // Creates a temporary directory for use by this profile. |
| 309 void CreateTempProfileDir(); | 310 void CreateTempProfileDir(); |
| 310 | 311 |
| 311 // Common initialization between the two constructors. | 312 // Common initialization between the two constructors. |
| 312 void Init(); | 313 void Init(); |
| 313 | 314 |
| 314 // Finishes initialization when a profile is created asynchronously. | 315 // Finishes initialization when a profile is created asynchronously. |
| 315 void FinishInit(); | 316 void FinishInit(); |
| 316 | 317 |
| 318 // Destroys favicon service if it has been created. |
| 319 void DestroyFaviconService(); |
| 320 |
| 317 // Creates a TestingPrefService and associates it with the TestingProfile. | 321 // Creates a TestingPrefService and associates it with the TestingProfile. |
| 318 void CreateTestingPrefService(); | 322 void CreateTestingPrefService(); |
| 319 | 323 |
| 320 virtual base::Callback<ChromeURLDataManagerBackend*(void)> | 324 virtual base::Callback<ChromeURLDataManagerBackend*(void)> |
| 321 GetChromeURLDataManagerBackendGetter() const OVERRIDE; | 325 GetChromeURLDataManagerBackendGetter() const OVERRIDE; |
| 322 | 326 |
| 327 // The favicon service. Only created if CreateFaviconService is invoked. |
| 328 scoped_ptr<FaviconService> favicon_service_; |
| 329 |
| 323 // The policy service. Lazily created as a stub. | 330 // The policy service. Lazily created as a stub. |
| 324 scoped_ptr<policy::PolicyService> policy_service_; | 331 scoped_ptr<policy::PolicyService> policy_service_; |
| 325 | 332 |
| 326 // Internally, this is a TestURLRequestContextGetter that creates a dummy | 333 // Internally, this is a TestURLRequestContextGetter that creates a dummy |
| 327 // request context. Currently, only the CookieMonster is hooked up. | 334 // request context. Currently, only the CookieMonster is hooked up. |
| 328 scoped_refptr<net::URLRequestContextGetter> request_context_; | 335 scoped_refptr<net::URLRequestContextGetter> request_context_; |
| 329 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; | 336 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; |
| 330 | 337 |
| 331 std::wstring id_; | 338 std::wstring id_; |
| 332 | 339 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 // testing. | 372 // testing. |
| 366 ProfileDependencyManager* profile_dependency_manager_; | 373 ProfileDependencyManager* profile_dependency_manager_; |
| 367 | 374 |
| 368 scoped_ptr<content::MockResourceContext> resource_context_; | 375 scoped_ptr<content::MockResourceContext> resource_context_; |
| 369 | 376 |
| 370 // Weak pointer to a delegate for indicating that a profile was created. | 377 // Weak pointer to a delegate for indicating that a profile was created. |
| 371 Delegate* delegate_; | 378 Delegate* delegate_; |
| 372 }; | 379 }; |
| 373 | 380 |
| 374 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 381 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| OLD | NEW |