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

Unified Diff: components/browser_context_keyed_service/browser_context_keyed_service_factory.cc

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.cc
diff --git a/components/browser_context_keyed_service/browser_context_keyed_service_factory.cc b/components/browser_context_keyed_service/browser_context_keyed_service_factory.cc
index c9d6646e03c279f6caa15fe0082324c6a4ca4cfb..d8d51fb1e897d0acc2b12a5614e98b0d2093c676 100644
--- a/components/browser_context_keyed_service/browser_context_keyed_service_factory.cc
+++ b/components/browser_context_keyed_service/browser_context_keyed_service_factory.cc
@@ -49,6 +49,11 @@ BrowserContextKeyedServiceFactory::SetTestingFactoryAndUse(
return GetServiceForBrowserContext(context, true);
}
+void BrowserContextKeyedServiceFactory::RemoveTestingFactory(
+ content::BrowserContext* context) {
+ testing_factories_.erase(context);
Andrew T Wilson (Slow) 2014/03/10 12:30:45 I think we should get rid of this, but if we keep
+}
+
BrowserContextKeyedServiceFactory::BrowserContextKeyedServiceFactory(
const char* name, BrowserContextDependencyManager* manager)
: BrowserContextKeyedBaseFactory(name, manager) {
@@ -127,7 +132,7 @@ void BrowserContextKeyedServiceFactory::BrowserContextDestroyed(
// maintain a big map of dead pointers, but also since we may have a second
// object that lives at the same address (see other comments about unit tests
// in this file).
- testing_factories_.erase(context);
+ RemoveTestingFactory(context);
BrowserContextKeyedBaseFactory::BrowserContextDestroyed(context);
}

Powered by Google App Engine
This is Rietveld 408576698