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

Unified Diff: content/browser/browser_child_process_host_impl.cc

Issue 2585963002: Clarifying the parameters ownership of BrowserChildProcessHost::Launch() (Closed)
Patch Set: Fixed crasher on Windows. Created 4 years 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 | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/child_process_launcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_child_process_host_impl.cc
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 3bca51b7f445058af4e9e1757bd15d120ee82f86..5b155f4113a0cf8d7cad2cd9ca2ee748ebf0e5dd 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -227,13 +227,13 @@ void BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(
}
void BrowserChildProcessHostImpl::Launch(
- SandboxedProcessLauncherDelegate* delegate,
- base::CommandLine* cmd_line,
+ std::unique_ptr<SandboxedProcessLauncherDelegate> delegate,
+ std::unique_ptr<base::CommandLine> cmd_line,
bool terminate_on_shutdown) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- GetContentClient()->browser()->AppendExtraCommandLineSwitches(
- cmd_line, data_.id);
+ GetContentClient()->browser()->AppendExtraCommandLineSwitches(cmd_line.get(),
+ data_.id);
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
@@ -256,7 +256,7 @@ void BrowserChildProcessHostImpl::Launch(
notify_child_disconnected_ = true;
child_process_.reset(new ChildProcessLauncher(
- delegate, cmd_line, data_.id, this, child_token_,
+ std::move(delegate), std::move(cmd_line), data_.id, this, child_token_,
base::Bind(&BrowserChildProcessHostImpl::OnMojoError,
weak_factory_.GetWeakPtr(),
base::ThreadTaskRunnerHandle::Get()),
« no previous file with comments | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/child_process_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698