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

Unified Diff: components/browser_context_keyed_service/browser_context_keyed_service_factory.h

Issue 189443008: Use TestingProfile::Builder::AddTestingFactory at ChromeRenderViewHostTestHarness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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_keyed_service_factory.h
diff --git a/components/browser_context_keyed_service/browser_context_keyed_service_factory.h b/components/browser_context_keyed_service/browser_context_keyed_service_factory.h
index f97144d1085f8d877f03efcc3dde08cbd543eb52..4ebab5992ccef8a662ebb8e394269b06d774230d 100644
--- a/components/browser_context_keyed_service/browser_context_keyed_service_factory.h
+++ b/components/browser_context_keyed_service/browser_context_keyed_service_factory.h
@@ -46,6 +46,12 @@ class BROWSER_CONTEXT_KEYED_SERVICE_EXPORT BrowserContextKeyedServiceFactory
content::BrowserContext* context,
TestingFactoryFunction factory);
+ // Removes the testing factory associated with |context|, if there is one.
+ // This can be used by tests that require a service that isn't created for
+ // tests by default (because its factory returns true from
+ // ServiceIsNULLWhileTesting).
+ void RemoveTestingFactory(content::BrowserContext* context);
Paweł Hajdan Jr. 2014/03/07 22:08:12 This can easily make the code harder to follow. Ca
Joao da Silva 2014/03/07 23:29:20 That would be great, can you suggest a way to do i
+
protected:
// BrowserContextKeyedServiceFactories must communicate with a
// BrowserContextDependencyManager. For all non-test code, write your subclass

Powered by Google App Engine
This is Rietveld 408576698