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

Unified Diff: components/browser_context_keyed_service/browser_context_dependency_manager.h

Issue 23068005: Convert UserPolicySigninService to use OAuth2TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 7 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 side-by-side diff with in-line comments
Download patch
Index: components/browser_context_keyed_service/browser_context_dependency_manager.h
diff --git a/components/browser_context_keyed_service/browser_context_dependency_manager.h b/components/browser_context_keyed_service/browser_context_dependency_manager.h
index 3e96eff98b5e1cf36d4490502ed1e6fc92085a33..5482aaa92831ef6332e89ab57d57ddf2beced6b3 100644
--- a/components/browser_context_keyed_service/browser_context_dependency_manager.h
+++ b/components/browser_context_keyed_service/browser_context_dependency_manager.h
@@ -34,12 +34,22 @@ class BROWSER_CONTEXT_KEYED_SERVICE_EXPORT BrowserContextDependencyManager {
BrowserContextKeyedBaseFactory* dependee);
// Called by each BrowserContext to alert us of its creation. Several services
- // want to be started when a context is created. Testing configuration is also
- // done at this time. (If you want your BrowserContextKeyedService to be
- // started with the BrowserContext, override BrowserContextKeyedBaseFactory::
- // ServiceIsCreatedWithBrowserContext() to return true.)
- void CreateBrowserContextServices(content::BrowserContext* context,
- bool is_testing_context);
+ // want to be started when a context is created. If you want your
+ // BrowserContextKeyedService to be started with the BrowserContext, override
+ // BrowserContextKeyedBaseFactory::ServiceIsCreatedWithBrowserContext() to
+ // return true. This method also registers any service-related preferences
+ // for non-incognito profiles.
+ void CreateBrowserContextServices(content::BrowserContext* context);
+
+ // Similar to CreateBrowserContextServices(), except this is used for creating
+ // test BrowserContexts - these contexts will not create services for any
+ // BrowserContextKeyedBaseFactories that return true from
+ // ServiceIsNULLWhileTesting(). Callers can pass |force_register_prefs| as
+ // true to have preferences registered even for incognito profiles - this
+ // allows tests to specify a standalone incognito profile without an
+ // associated normal profile.
+ void CreateBrowserContextServicesForTest(content::BrowserContext* context,
+ bool force_register_prefs);
// Called by each BrowserContext to alert us that we should destroy services
// associated with it.
@@ -58,6 +68,11 @@ class BROWSER_CONTEXT_KEYED_SERVICE_EXPORT BrowserContextDependencyManager {
friend class BrowserContextDependencyManagerUnittests;
friend struct DefaultSingletonTraits<BrowserContextDependencyManager>;
+ // Helper function used by CreateBrowserContextServices[ForTest].
+ void DoCreateBrowserContextServices(content::BrowserContext* context,
+ bool is_testing_context,
+ bool force_register_prefs);
+
BrowserContextDependencyManager();
virtual ~BrowserContextDependencyManager();

Powered by Google App Engine
This is Rietveld 408576698