| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 // ref only for right type, lifecycle is managed by prefs_ | 241 // ref only for right type, lifecycle is managed by prefs_ |
| 242 TestingPrefService* testing_prefs_; | 242 TestingPrefService* testing_prefs_; |
| 243 | 243 |
| 244 private: | 244 private: |
| 245 // Common initialization between the two constructors. | 245 // Common initialization between the two constructors. |
| 246 void Init(); | 246 void Init(); |
| 247 | 247 |
| 248 // Finishes initialization when a profile is created asynchronously. | 248 // Finishes initialization when a profile is created asynchronously. |
| 249 void FinishInit(); | 249 void FinishInit(); |
| 250 | 250 |
| 251 // Destroys favicon service if it has been created. | |
| 252 void DestroyFaviconService(); | |
| 253 | |
| 254 // Creates a TestingPrefService and associates it with the TestingProfile. | 251 // Creates a TestingPrefService and associates it with the TestingProfile. |
| 255 void CreateTestingPrefService(); | 252 void CreateTestingPrefService(); |
| 256 | 253 |
| 257 virtual base::Callback<ChromeURLDataManagerBackend*(void)> | 254 virtual base::Callback<ChromeURLDataManagerBackend*(void)> |
| 258 GetChromeURLDataManagerBackendGetter() const OVERRIDE; | 255 GetChromeURLDataManagerBackendGetter() const OVERRIDE; |
| 259 | 256 |
| 260 // The favicon service. Only created if CreateFaviconService is invoked. | |
| 261 scoped_ptr<FaviconService> favicon_service_; | |
| 262 | |
| 263 // The policy service. Lazily created as a stub. | 257 // The policy service. Lazily created as a stub. |
| 264 scoped_ptr<policy::PolicyService> policy_service_; | 258 scoped_ptr<policy::PolicyService> policy_service_; |
| 265 | 259 |
| 266 // Internally, this is a TestURLRequestContextGetter that creates a dummy | 260 // Internally, this is a TestURLRequestContextGetter that creates a dummy |
| 267 // request context. Currently, only the CookieMonster is hooked up. | 261 // request context. Currently, only the CookieMonster is hooked up. |
| 268 scoped_refptr<net::URLRequestContextGetter> request_context_; | 262 scoped_refptr<net::URLRequestContextGetter> request_context_; |
| 269 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; | 263 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; |
| 270 | 264 |
| 271 std::wstring id_; | 265 std::wstring id_; |
| 272 | 266 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 302 // testing. | 296 // testing. |
| 303 ProfileDependencyManager* profile_dependency_manager_; | 297 ProfileDependencyManager* profile_dependency_manager_; |
| 304 | 298 |
| 305 scoped_ptr<content::MockResourceContext> resource_context_; | 299 scoped_ptr<content::MockResourceContext> resource_context_; |
| 306 | 300 |
| 307 // Weak pointer to a delegate for indicating that a profile was created. | 301 // Weak pointer to a delegate for indicating that a profile was created. |
| 308 Delegate* delegate_; | 302 Delegate* delegate_; |
| 309 }; | 303 }; |
| 310 | 304 |
| 311 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 305 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| OLD | NEW |