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

Unified Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 2258493003: 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
Index: chromecast/browser/cast_browser_main_parts.cc
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index 56f705e5b4bffb0333f3cb1464aef2ed928ad4ae..fccad156ac79b362a9013c3a6c40c31d6151c1c6 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -353,8 +353,9 @@ void CastBrowserMainParts::PreMainMessageLoopStart() {
}
void CastBrowserMainParts::PostMainMessageLoopStart() {
- cast_browser_process_->SetMetricsHelper(base::WrapUnique(
- new metrics::CastMetricsHelper(base::ThreadTaskRunnerHandle::Get())));
+ cast_browser_process_->SetMetricsHelper(
+ base::MakeUnique<metrics::CastMetricsHelper>(
+ base::ThreadTaskRunnerHandle::Get()));
#if defined(OS_ANDROID)
base::MessageLoopForUI::current()->Start();
@@ -387,7 +388,7 @@ int CastBrowserMainParts::PreCreateThreads() {
LOG(ERROR) << "Could not find crash dump location.";
}
cast_browser_process_->SetCrashDumpManager(
- base::WrapUnique(new breakpad::CrashDumpManager(crash_dumps_dir)));
+ base::MakeUnique<breakpad::CrashDumpManager>(crash_dumps_dir));
#else
base::FilePath home_dir;
CHECK(PathService::Get(DIR_CAST_HOME, &home_dir));
@@ -436,7 +437,7 @@ void CastBrowserMainParts::PreMainMessageLoopRun() {
url_request_context_factory_->InitializeOnUIThread(net_log_.get());
cast_browser_process_->SetBrowserContext(
- base::WrapUnique(new CastBrowserContext(url_request_context_factory_)));
+ base::MakeUnique<CastBrowserContext>(url_request_context_factory_));
cast_browser_process_->SetMetricsServiceClient(
metrics::CastMetricsServiceClient::Create(
content::BrowserThread::GetBlockingPool(),
@@ -448,9 +449,10 @@ void CastBrowserMainParts::PreMainMessageLoopRun() {
if (!PlatformClientAuth::Initialize())
LOG(ERROR) << "PlatformClientAuth::Initialize failed.";
- cast_browser_process_->SetRemoteDebuggingServer(base::WrapUnique(
- new RemoteDebuggingServer(cast_browser_process_->browser_client()
- ->EnableRemoteDebuggingImmediately())));
+ cast_browser_process_->SetRemoteDebuggingServer(
+ base::MakeUnique<RemoteDebuggingServer>(
+ cast_browser_process_->browser_client()
+ ->EnableRemoteDebuggingImmediately()));
#if defined(USE_AURA) && !BUILDFLAG(DISABLE_DISPLAY)
// TODO(halliwell) move audio builds to use ozone_platform_cast, then can
« no previous file with comments | « chromecast/base/device_capabilities_impl_unittest.cc ('k') | chromecast/browser/cast_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698