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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 2365273004: Initial implementation for sharing field trial state (win) (Closed)
Patch Set: Remove windows macro causing compilation issue Created 4 years, 2 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: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 367a69d9323fd065203a78416690ba86d09ad846..2438784bbd6ae3bfd9ccd00e328f335af0407714 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -973,8 +973,16 @@ bool GpuProcessHost::LaunchGpuProcess(gpu::GpuPreferences* gpu_preferences) {
base::CommandLine* cmd_line = new base::CommandLine(exe_path);
#endif
+
cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess);
+
+#if defined(OS_WIN)
+ field_trial_state_.reset(new base::SharedMemory());
+ BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(
+ cmd_line, field_trial_state_.get());
+#else
BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(cmd_line);
+#endif
#if defined(OS_WIN)
cmd_line->AppendArg(switches::kPrefetchArgumentGpu);
@@ -1020,6 +1028,7 @@ bool GpuProcessHost::LaunchGpuProcess(gpu::GpuPreferences* gpu_preferences) {
process_->Launch(
new GpuSandboxedProcessLauncherDelegate(cmd_line,
process_->GetHost()),
+ field_trial_state_.get(),
cmd_line,
true);
process_launched_ = true;

Powered by Google App Engine
This is Rietveld 408576698