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

Unified Diff: components/keyed_service/core/keyed_service_factory.cc

Issue 1918083002: Convert //components/[f-n]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: … Created 4 years, 8 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/core/keyed_service_factory.cc
diff --git a/components/keyed_service/core/keyed_service_factory.cc b/components/keyed_service/core/keyed_service_factory.cc
index 401efa284bc29f9c0713568b107aa9bb2de705e6..7fe140779bca918219b470e61d617f8642996be7 100644
--- a/components/keyed_service/core/keyed_service_factory.cc
+++ b/components/keyed_service/core/keyed_service_factory.cc
@@ -79,7 +79,7 @@ KeyedService* KeyedServiceFactory::GetServiceForContext(
// Create new object.
// Check to see if we have a per-context testing factory that we should use
// instead of default behavior.
- scoped_ptr<KeyedService> service;
+ std::unique_ptr<KeyedService> service;
const auto& jt = testing_factories_.find(context);
if (jt != testing_factories_.end()) {
if (jt->second) {
@@ -96,7 +96,7 @@ KeyedService* KeyedServiceFactory::GetServiceForContext(
}
void KeyedServiceFactory::Associate(base::SupportsUserData* context,
- scoped_ptr<KeyedService> service) {
+ std::unique_ptr<KeyedService> service) {
DCHECK(!ContainsKey(mapping_, context));
mapping_.insert(std::make_pair(context, service.release()));
}
« no previous file with comments | « components/keyed_service/core/keyed_service_factory.h ('k') | components/keyed_service/core/keyed_service_shutdown_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698