Index: content/browser/child_process_launcher.cc |
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc |
index 5a655368aa8bac219446a3ea3586a4c7b6eb7666..f204c0e7ef582a9d1352ddbba5316d5be6a993cf 100644 |
--- a/content/browser/child_process_launcher.cc |
+++ b/content/browser/child_process_launcher.cc |
@@ -121,6 +121,7 @@ void LaunchOnLauncherThread(const NotifyCallback& callback, |
#if defined(OS_ANDROID) |
base::ScopedFD ipcfd, |
#endif |
+ base::SharedMemory* field_trial_state, |
mojo::edk::ScopedPlatformHandle client_handle, |
base::CommandLine* cmd_line) { |
DCHECK_CURRENTLY_ON(BrowserThread::PROCESS_LAUNCHER); |
@@ -152,9 +153,12 @@ void LaunchOnLauncherThread(const NotifyCallback& callback, |
} else { |
base::HandlesToInheritVector handles; |
handles.push_back(client_handle.get().handle); |
+ if (field_trial_state) |
+ handles.push_back(field_trial_state->handle().GetHandle()); |
Alexei Svitkine (slow)
2016/10/03 15:28:05
Since both of these functions are const, please pa
lawrencewu
2016/10/03 21:36:11
Done.
|
cmd_line->AppendSwitchASCII( |
mojo::edk::PlatformChannelPair::kMojoPlatformChannelHandleSwitch, |
base::UintToString(base::win::HandleToUint32(handles[0]))); |
+ |
Alexei Svitkine (slow)
2016/10/03 15:28:05
Nit: Remove extra added line.
lawrencewu
2016/10/03 21:36:11
Done.
|
launch_result = |
StartSandboxedProcess(delegate, cmd_line, handles, &process); |
} |
@@ -391,6 +395,7 @@ void SetProcessBackgroundedOnLauncherThread(base::Process process, |
ChildProcessLauncher::ChildProcessLauncher( |
SandboxedProcessLauncherDelegate* delegate, |
+ base::SharedMemory* field_trial_state, |
Alexei Svitkine (slow)
2016/10/03 15:28:05
Suggest moving this further down - maybe after cli
lawrencewu
2016/10/03 21:36:11
Done.
|
base::CommandLine* cmd_line, |
int child_process_id, |
Client* client, |
@@ -414,7 +419,7 @@ ChildProcessLauncher::ChildProcessLauncher( |
weak_factory_(this) { |
DCHECK(CalledOnValidThread()); |
CHECK(BrowserThread::GetCurrentThreadIdentifier(&client_thread_id_)); |
- Launch(delegate, cmd_line, child_process_id); |
+ Launch(delegate, field_trial_state, cmd_line, child_process_id); |
} |
ChildProcessLauncher::~ChildProcessLauncher() { |
@@ -430,6 +435,7 @@ ChildProcessLauncher::~ChildProcessLauncher() { |
void ChildProcessLauncher::Launch( |
SandboxedProcessLauncherDelegate* delegate, |
+ base::SharedMemory* field_trial_state, |
base::CommandLine* cmd_line, |
int child_process_id) { |
DCHECK(CalledOnValidThread()); |
@@ -480,6 +486,7 @@ void ChildProcessLauncher::Launch( |
#if defined(OS_ANDROID) |
base::Passed(&ipcfd), |
#endif |
+ field_trial_state, |
base::Passed(&client_handle), cmd_line)); |
} |