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

Unified Diff: services/shell/public/cpp/lib/service_context_ref.cc

Issue 2259823003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « services/shell/public/cpp/lib/interface_registry.cc ('k') | services/shell/public/cpp/lib/service_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/lib/service_context_ref.cc
diff --git a/services/shell/public/cpp/lib/service_context_ref.cc b/services/shell/public/cpp/lib/service_context_ref.cc
index 92c70288b245d2da2197951e0041b7e4d1939985..177010b1be8fa0ab397d635d1eb9520b75a43d9e 100644
--- a/services/shell/public/cpp/lib/service_context_ref.cc
+++ b/services/shell/public/cpp/lib/service_context_ref.cc
@@ -49,8 +49,8 @@ class ServiceContextRefImpl : public ServiceContextRef {
base::Bind(&ServiceContextRefFactory::AddRef, factory_));
}
- return base::WrapUnique(
- new ServiceContextRefImpl(factory_, service_task_runner_));
+ return base::MakeUnique<ServiceContextRefImpl>(factory_,
+ service_task_runner_);
}
base::WeakPtr<ServiceContextRefFactory> factory_;
@@ -70,9 +70,8 @@ ServiceContextRefFactory::~ServiceContextRefFactory() {}
std::unique_ptr<ServiceContextRef> ServiceContextRefFactory::CreateRef() {
AddRef();
- return base::WrapUnique(
- new ServiceContextRefImpl(weak_factory_.GetWeakPtr(),
- base::ThreadTaskRunnerHandle::Get()));
+ return base::MakeUnique<ServiceContextRefImpl>(
+ weak_factory_.GetWeakPtr(), base::ThreadTaskRunnerHandle::Get());
}
void ServiceContextRefFactory::AddRef() {
« no previous file with comments | « services/shell/public/cpp/lib/interface_registry.cc ('k') | services/shell/public/cpp/lib/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698