Chromium Code Reviews| 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..2ede7700d2686093e58c1b4f6a653250a03f5c80 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,12 @@ 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); |
| + |
|
Mattias Nissler (ping if slow)
2013/08/19 14:03:22
nit: remove extra blank line
Andrew T Wilson (Slow)
2013/08/20 09:28:35
Done.
|
| + |
| BrowserContextDependencyManager(); |
| virtual ~BrowserContextDependencyManager(); |