Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index 00f88e99958af2563e24f2a1e09c9d1f1b39263c..c7ebb8d10b89cf150d467318a51c4f5291f2e732 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -967,7 +967,11 @@ bool RenderProcessHostImpl::Init() { |
// As long as there's no renderer prefix, we can use the zygote process |
// at this stage. |
child_process_launcher_.reset(new ChildProcessLauncher( |
- new RendererSandboxedProcessLauncherDelegate(channel_.get()), cmd_line, |
+ new RendererSandboxedProcessLauncherDelegate(channel_.get()), |
+#if defined(OS_WIN) |
+ field_trial_state_.get()->handle().GetHandle(), |
Alexei Svitkine (slow)
2016/09/30 21:47:52
Can we pass base::SharedMemory* instead of HANDLE?
lawrencewu
2016/10/03 14:14:36
Done.
|
+#endif |
+ cmd_line, |
GetID(), this, child_token_, |
base::Bind(&RenderProcessHostImpl::OnMojoError, |
weak_factory_.GetWeakPtr(), |
@@ -1587,7 +1591,7 @@ static void AppendCompositorCommandLineFlags(base::CommandLine* command_line) { |
} |
void RenderProcessHostImpl::AppendRendererCommandLine( |
- base::CommandLine* command_line) const { |
+ base::CommandLine* command_line) { |
// Pass the process type first, so it shows first in process listings. |
command_line->AppendSwitchASCII(switches::kProcessType, |
switches::kRendererProcess); |
@@ -1626,7 +1630,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( |
void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( |
const base::CommandLine& browser_cmd, |
- base::CommandLine* renderer_cmd) const { |
+ base::CommandLine* renderer_cmd) { |
// Propagate the following switches to the renderer command line (along |
// with any associated values) if present in the browser command line. |
static const char* const kSwitchNames[] = { |
@@ -1839,7 +1843,13 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( |
renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames, |
arraysize(kSwitchNames)); |
+#if defined(OS_WIN) |
+ field_trial_state_.reset(new base::SharedMemory()); |
+ BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags( |
+ renderer_cmd, field_trial_state_.get()); |
+#else |
BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(renderer_cmd); |
+#endif |
if (browser_cmd.HasSwitch(switches::kTraceStartup) && |
BrowserMainLoop::GetInstance()->is_tracing_startup_for_duration()) { |