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

Unified Diff: components/keyed_service/ios/browser_state_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: Rebase 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/ios/browser_state_keyed_service_factory.cc
diff --git a/components/keyed_service/ios/browser_state_keyed_service_factory.cc b/components/keyed_service/ios/browser_state_keyed_service_factory.cc
index c5279912454907fc1e9fdaf74e7abe6a3668540a..7c75278f81efb92e03e9251b033023f53b92efe1 100644
--- a/components/keyed_service/ios/browser_state_keyed_service_factory.cc
+++ b/components/keyed_service/ios/browser_state_keyed_service_factory.cc
@@ -74,9 +74,13 @@ void BrowserStateKeyedServiceFactory::BrowserStateDestroyed(
KeyedServiceFactory::ContextDestroyed(context);
}
-KeyedService* BrowserStateKeyedServiceFactory::BuildServiceInstanceFor(
+scoped_ptr<KeyedService>
+BrowserStateKeyedServiceFactory::BuildServiceInstanceFor(
base::SupportsUserData* context) const {
- return BuildServiceInstanceFor(static_cast<web::BrowserState*>(context));
+ // TODO(isherman): The wrapped BuildServiceInstanceFor() should return a
+ // scoped_ptr as well.
+ return make_scoped_ptr(
+ BuildServiceInstanceFor(static_cast<web::BrowserState*>(context)));
}
bool BrowserStateKeyedServiceFactory::IsOffTheRecord(

Powered by Google App Engine
This is Rietveld 408576698