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

Unified Diff: components/keyed_service/content/browser_context_keyed_service_factory.cc

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finish renaming profile -> context Created 5 years, 6 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/keyed_service/content/browser_context_keyed_service_factory.cc
diff --git a/components/keyed_service/content/browser_context_keyed_service_factory.cc b/components/keyed_service/content/browser_context_keyed_service_factory.cc
index d7edb8ec24c2504a7993b0bb06330c1c137fbdde..db69459aa818ecf882f29113e5deec319d55dbce 100644
--- a/components/keyed_service/content/browser_context_keyed_service_factory.cc
+++ b/components/keyed_service/content/browser_context_keyed_service_factory.cc
@@ -85,10 +85,13 @@ void BrowserContextKeyedServiceFactory::BrowserContextDestroyed(
KeyedServiceFactory::ContextDestroyed(context);
}
-KeyedService* BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(
+scoped_ptr<KeyedService>
+BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(
base::SupportsUserData* context) const {
- return BuildServiceInstanceFor(
- static_cast<content::BrowserContext*>(context));
+ // TODO(isherman): The wrapped BuildServiceInstanceFor() should return a
+ // scoped_ptr as well.
+ return make_scoped_ptr(
+ BuildServiceInstanceFor(static_cast<content::BrowserContext*>(context)));
}
bool BrowserContextKeyedServiceFactory::IsOffTheRecord(

Powered by Google App Engine
This is Rietveld 408576698