Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: chrome/test/base/testing_profile.h

Issue 10828263: Moving FaviconService to a ProfileKeyedService. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
30 class CookieMonster; 30 class CookieMonster;
31 class URLRequestContextGetter; 31 class URLRequestContextGetter;
32 } 32 }
33 33
34 namespace quota { 34 namespace quota {
35 class SpecialStoragePolicy; 35 class SpecialStoragePolicy;
36 } 36 }
37 37
38 class CommandLine; 38 class CommandLine;
39 class ExtensionSpecialStoragePolicy; 39 class ExtensionSpecialStoragePolicy;
40 class FaviconService;
41 class HostContentSettingsMap; 40 class HostContentSettingsMap;
42 class PrefService; 41 class PrefService;
43 class ProfileDependencyManager; 42 class ProfileDependencyManager;
44 class ProfileSyncService; 43 class ProfileSyncService;
45 class TemplateURLService; 44 class TemplateURLService;
46 class TestingPrefService; 45 class TestingPrefService;
47 46
48 class TestingProfile : public Profile { 47 class TestingProfile : public Profile {
49 public: 48 public:
50 // Profile directory name for the test user. This is "Default" on most 49 // Profile directory name for the test user. This is "Default" on most
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 virtual Profile* GetOriginalProfile() OVERRIDE; 208 virtual Profile* GetOriginalProfile() OVERRIDE;
210 virtual VisitedLinkMaster* GetVisitedLinkMaster() OVERRIDE; 209 virtual VisitedLinkMaster* GetVisitedLinkMaster() OVERRIDE;
211 virtual ExtensionService* GetExtensionService() OVERRIDE; 210 virtual ExtensionService* GetExtensionService() OVERRIDE;
212 virtual extensions::UserScriptMaster* GetUserScriptMaster() OVERRIDE; 211 virtual extensions::UserScriptMaster* GetUserScriptMaster() OVERRIDE;
213 virtual ExtensionProcessManager* GetExtensionProcessManager() OVERRIDE; 212 virtual ExtensionProcessManager* GetExtensionProcessManager() OVERRIDE;
214 virtual extensions::EventRouter* GetExtensionEventRouter() OVERRIDE; 213 virtual extensions::EventRouter* GetExtensionEventRouter() OVERRIDE;
215 void SetExtensionSpecialStoragePolicy( 214 void SetExtensionSpecialStoragePolicy(
216 ExtensionSpecialStoragePolicy* extension_special_storage_policy); 215 ExtensionSpecialStoragePolicy* extension_special_storage_policy);
217 virtual ExtensionSpecialStoragePolicy* 216 virtual ExtensionSpecialStoragePolicy*
218 GetExtensionSpecialStoragePolicy() OVERRIDE; 217 GetExtensionSpecialStoragePolicy() OVERRIDE;
219 virtual FaviconService* GetFaviconService(ServiceAccessType access) OVERRIDE;
220 // The CookieMonster will only be returned if a Context has been created. Do 218 // The CookieMonster will only be returned if a Context has been created. Do
221 // this by calling CreateRequestContext(). See the note at GetRequestContext 219 // this by calling CreateRequestContext(). See the note at GetRequestContext
222 // for more information. 220 // for more information.
223 net::CookieMonster* GetCookieMonster(); 221 net::CookieMonster* GetCookieMonster();
224 222
225 virtual policy::UserCloudPolicyManager* GetUserCloudPolicyManager() OVERRIDE; 223 virtual policy::UserCloudPolicyManager* GetUserCloudPolicyManager() OVERRIDE;
226 virtual policy::PolicyService* GetPolicyService() OVERRIDE; 224 virtual policy::PolicyService* GetPolicyService() OVERRIDE;
227 // Sets the profile's PrefService. If a pref service hasn't been explicitly 225 // Sets the profile's PrefService. If a pref service hasn't been explicitly
228 // set GetPrefs creates one, so normally you need not invoke this. If you need 226 // set GetPrefs creates one, so normally you need not invoke this. If you need
229 // to set a pref service you must invoke this before GetPrefs. 227 // to set a pref service you must invoke this before GetPrefs.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 private: 297 private:
300 // Creates a temporary directory for use by this profile. 298 // Creates a temporary directory for use by this profile.
301 void CreateTempProfileDir(); 299 void CreateTempProfileDir();
302 300
303 // Common initialization between the two constructors. 301 // Common initialization between the two constructors.
304 void Init(); 302 void Init();
305 303
306 // Finishes initialization when a profile is created asynchronously. 304 // Finishes initialization when a profile is created asynchronously.
307 void FinishInit(); 305 void FinishInit();
308 306
309 // Destroys favicon service if it has been created.
310 void DestroyFaviconService();
311
312 // Creates a TestingPrefService and associates it with the TestingProfile. 307 // Creates a TestingPrefService and associates it with the TestingProfile.
313 void CreateTestingPrefService(); 308 void CreateTestingPrefService();
314 309
315 virtual base::Callback<ChromeURLDataManagerBackend*(void)> 310 virtual base::Callback<ChromeURLDataManagerBackend*(void)>
316 GetChromeURLDataManagerBackendGetter() const OVERRIDE; 311 GetChromeURLDataManagerBackendGetter() const OVERRIDE;
317 312
318 // The favicon service. Only created if CreateFaviconService is invoked.
319 scoped_ptr<FaviconService> favicon_service_;
320
321 // The policy service. Lazily created as a stub. 313 // The policy service. Lazily created as a stub.
322 scoped_ptr<policy::PolicyService> policy_service_; 314 scoped_ptr<policy::PolicyService> policy_service_;
323 315
324 // Internally, this is a TestURLRequestContextGetter that creates a dummy 316 // Internally, this is a TestURLRequestContextGetter that creates a dummy
325 // request context. Currently, only the CookieMonster is hooked up. 317 // request context. Currently, only the CookieMonster is hooked up.
326 scoped_refptr<net::URLRequestContextGetter> request_context_; 318 scoped_refptr<net::URLRequestContextGetter> request_context_;
327 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; 319 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_;
328 320
329 std::wstring id_; 321 std::wstring id_;
330 322
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // testing. 355 // testing.
364 ProfileDependencyManager* profile_dependency_manager_; 356 ProfileDependencyManager* profile_dependency_manager_;
365 357
366 scoped_ptr<content::MockResourceContext> resource_context_; 358 scoped_ptr<content::MockResourceContext> resource_context_;
367 359
368 // Weak pointer to a delegate for indicating that a profile was created. 360 // Weak pointer to a delegate for indicating that a profile was created.
369 Delegate* delegate_; 361 Delegate* delegate_;
370 }; 362 };
371 363
372 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ 364 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698