| 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();
|
|
|
|
|