Index: content/browser/utility_process_host_impl.cc |
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc |
index 70bb8c0c5bccf5dd88a3c5c53d71a86aad9de503..4d5042179f917ae87cccacdee9879a232dcf9024 100644 |
--- a/content/browser/utility_process_host_impl.cc |
+++ b/content/browser/utility_process_host_impl.cc |
@@ -274,8 +274,8 @@ bool UtilityProcessHostImpl::StartProcess() { |
// readlink("/prof/self/exe") sometimes fails on Android at startup. |
// As a workaround skip calling it here, since the executable name is |
// not needed on Android anyway. See crbug.com/500854. |
- base::CommandLine* cmd_line = |
- new base::CommandLine(base::CommandLine::NO_PROGRAM); |
+ std::unique_ptr<base::CommandLine> cmd_line = |
+ base::MakeUnique<base::CommandLine>(base::CommandLine::NO_PROGRAM); |
#else |
int child_flags = child_flags_; |
@@ -293,7 +293,8 @@ bool UtilityProcessHostImpl::StartProcess() { |
return false; |
} |
- base::CommandLine* cmd_line = new base::CommandLine(exe_path); |
+ std::unique_ptr<base::CommandLine> cmd_line = |
+ base::MakeUnique<base::CommandLine>(exe_path); |
#endif |
cmd_line->AppendSwitchASCII(switches::kProcessType, |
@@ -337,9 +338,9 @@ bool UtilityProcessHostImpl::StartProcess() { |
cmd_line->AppendSwitch(switches::kUtilityProcessRunningElevated); |
#endif |
- process_->Launch(new UtilitySandboxedProcessLauncherDelegate( |
+ process_->Launch(base::MakeUnique<UtilitySandboxedProcessLauncherDelegate>( |
exposed_dir_, run_elevated_, no_sandbox_, env_), |
- cmd_line, true); |
+ std::move(cmd_line), true); |
} |
return true; |