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

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: resyncing with library after revert 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 virtual Profile* GetOriginalProfile() OVERRIDE; 208 virtual Profile* GetOriginalProfile() OVERRIDE;
209 virtual VisitedLinkMaster* GetVisitedLinkMaster() OVERRIDE; 209 virtual VisitedLinkMaster* GetVisitedLinkMaster() OVERRIDE;
210 virtual ExtensionService* GetExtensionService() OVERRIDE; 210 virtual ExtensionService* GetExtensionService() OVERRIDE;
211 virtual extensions::UserScriptMaster* GetUserScriptMaster() OVERRIDE; 211 virtual extensions::UserScriptMaster* GetUserScriptMaster() OVERRIDE;
212 virtual ExtensionProcessManager* GetExtensionProcessManager() OVERRIDE; 212 virtual ExtensionProcessManager* GetExtensionProcessManager() OVERRIDE;
213 virtual extensions::EventRouter* GetExtensionEventRouter() OVERRIDE; 213 virtual extensions::EventRouter* GetExtensionEventRouter() OVERRIDE;
214 void SetExtensionSpecialStoragePolicy( 214 void SetExtensionSpecialStoragePolicy(
215 ExtensionSpecialStoragePolicy* extension_special_storage_policy); 215 ExtensionSpecialStoragePolicy* extension_special_storage_policy);
216 virtual ExtensionSpecialStoragePolicy* 216 virtual ExtensionSpecialStoragePolicy*
217 GetExtensionSpecialStoragePolicy() OVERRIDE; 217 GetExtensionSpecialStoragePolicy() OVERRIDE;
218 virtual FaviconService* GetFaviconService(ServiceAccessType access) OVERRIDE;
219 // 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
220 // this by calling CreateRequestContext(). See the note at GetRequestContext 219 // this by calling CreateRequestContext(). See the note at GetRequestContext
221 // for more information. 220 // for more information.
222 net::CookieMonster* GetCookieMonster(); 221 net::CookieMonster* GetCookieMonster();
223 222
224 virtual policy::UserCloudPolicyManager* GetUserCloudPolicyManager() OVERRIDE; 223 virtual policy::UserCloudPolicyManager* GetUserCloudPolicyManager() OVERRIDE;
225 virtual policy::PolicyService* GetPolicyService() OVERRIDE; 224 virtual policy::PolicyService* GetPolicyService() OVERRIDE;
226 // 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
227 // 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
228 // to set a pref service you must invoke this before GetPrefs. 227 // to set a pref service you must invoke this before GetPrefs.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 private: 299 private:
301 // Creates a temporary directory for use by this profile. 300 // Creates a temporary directory for use by this profile.
302 void CreateTempProfileDir(); 301 void CreateTempProfileDir();
303 302
304 // Common initialization between the two constructors. 303 // Common initialization between the two constructors.
305 void Init(); 304 void Init();
306 305
307 // Finishes initialization when a profile is created asynchronously. 306 // Finishes initialization when a profile is created asynchronously.
308 void FinishInit(); 307 void FinishInit();
309 308
310 // Destroys favicon service if it has been created.
311 void DestroyFaviconService();
312
313 // Creates a TestingPrefService and associates it with the TestingProfile. 309 // Creates a TestingPrefService and associates it with the TestingProfile.
314 void CreateTestingPrefService(); 310 void CreateTestingPrefService();
315 311
316 virtual base::Callback<ChromeURLDataManagerBackend*(void)> 312 virtual base::Callback<ChromeURLDataManagerBackend*(void)>
317 GetChromeURLDataManagerBackendGetter() const OVERRIDE; 313 GetChromeURLDataManagerBackendGetter() const OVERRIDE;
318 314
319 // The favicon service. Only created if CreateFaviconService is invoked.
320 scoped_ptr<FaviconService> favicon_service_;
321
322 // The policy service. Lazily created as a stub. 315 // The policy service. Lazily created as a stub.
323 scoped_ptr<policy::PolicyService> policy_service_; 316 scoped_ptr<policy::PolicyService> policy_service_;
324 317
325 // Internally, this is a TestURLRequestContextGetter that creates a dummy 318 // Internally, this is a TestURLRequestContextGetter that creates a dummy
326 // request context. Currently, only the CookieMonster is hooked up. 319 // request context. Currently, only the CookieMonster is hooked up.
327 scoped_refptr<net::URLRequestContextGetter> request_context_; 320 scoped_refptr<net::URLRequestContextGetter> request_context_;
328 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; 321 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_;
329 322
330 std::wstring id_; 323 std::wstring id_;
331 324
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // testing. 357 // testing.
365 ProfileDependencyManager* profile_dependency_manager_; 358 ProfileDependencyManager* profile_dependency_manager_;
366 359
367 scoped_ptr<content::MockResourceContext> resource_context_; 360 scoped_ptr<content::MockResourceContext> resource_context_;
368 361
369 // 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.
370 Delegate* delegate_; 363 Delegate* delegate_;
371 }; 364 };
372 365
373 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ 366 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698