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

Side by Side Diff: content/browser/zygote_host/zygote_communication_linux.cc

Issue 1991953002: Implement a runtime headless mode for Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/zygote_host/zygote_communication_linux.h" 5 #include "content/browser/zygote_host/zygote_communication_linux.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/socket.h> 8 #include <sys/socket.h>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 *base::CommandLine::ForCurrentProcess(); 242 *base::CommandLine::ForCurrentProcess();
243 if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) { 243 if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) {
244 cmd_line.PrependWrapper( 244 cmd_line.PrependWrapper(
245 browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix)); 245 browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix));
246 } 246 }
247 // Append any switches from the browser process that need to be forwarded on 247 // Append any switches from the browser process that need to be forwarded on
248 // to the zygote/renderers. 248 // to the zygote/renderers.
249 // Should this list be obtained from browser_render_process_host.cc? 249 // Should this list be obtained from browser_render_process_host.cc?
250 static const char* const kForwardSwitches[] = { 250 static const char* const kForwardSwitches[] = {
251 switches::kAllowSandboxDebugging, switches::kAndroidFontsPath, 251 switches::kAllowSandboxDebugging, switches::kAndroidFontsPath,
252 switches::kDisableSeccompFilterSandbox, 252 switches::kDisableSeccompFilterSandbox, switches::kEnableHeapProfiling,
253 switches::kEnableHeapProfiling,
254 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. 253 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr.
254 switches::kHeadless,
255 // Zygote process needs to know what resources to have loaded when it 255 // Zygote process needs to know what resources to have loaded when it
256 // becomes a renderer process. 256 // becomes a renderer process.
257 switches::kForceDeviceScaleFactor, switches::kLoggingLevel, 257 switches::kForceDeviceScaleFactor, switches::kLoggingLevel,
258 switches::kNoSandbox, switches::kPpapiInProcess, 258 switches::kNoSandbox, switches::kPpapiInProcess,
259 switches::kRegisterPepperPlugins, switches::kV, switches::kVModule, 259 switches::kRegisterPepperPlugins, switches::kV, switches::kVModule,
260 }; 260 };
261 cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches, 261 cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches,
262 arraysize(kForwardSwitches)); 262 arraysize(kForwardSwitches));
263 263
264 GetContentClient()->browser()->AppendExtraCommandLineSwitches(&cmd_line, -1); 264 GetContentClient()->browser()->AppendExtraCommandLineSwitches(&cmd_line, -1);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 328 }
329 if (ReadSandboxStatus() == -1) { 329 if (ReadSandboxStatus() == -1) {
330 return 0; 330 return 0;
331 } 331 }
332 have_read_sandbox_status_word_ = true; 332 have_read_sandbox_status_word_ = true;
333 UMA_HISTOGRAM_SPARSE_SLOWLY("Linux.SandboxStatus", sandbox_status_); 333 UMA_HISTOGRAM_SPARSE_SLOWLY("Linux.SandboxStatus", sandbox_status_);
334 return sandbox_status_; 334 return sandbox_status_;
335 } 335 }
336 336
337 } // namespace content 337 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698