OLD | NEW |
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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 const base::CommandLine& browser_command_line = | 273 const base::CommandLine& browser_command_line = |
274 *base::CommandLine::ForCurrentProcess(); | 274 *base::CommandLine::ForCurrentProcess(); |
275 if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) { | 275 if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) { |
276 cmd_line.PrependWrapper( | 276 cmd_line.PrependWrapper( |
277 browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix)); | 277 browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix)); |
278 } | 278 } |
279 // Append any switches from the browser process that need to be forwarded on | 279 // Append any switches from the browser process that need to be forwarded on |
280 // to the zygote/renderers. | 280 // to the zygote/renderers. |
281 // Should this list be obtained from browser_render_process_host.cc? | 281 // Should this list be obtained from browser_render_process_host.cc? |
282 static const char* kForwardSwitches[] = { | 282 static const char* kForwardSwitches[] = { |
283 switches::kAllowSandboxDebugging, switches::kDisableSeccompFilterSandbox, | 283 switches::kAllowSandboxDebugging, switches::kAndroidFontsPath, |
| 284 switches::kDisableSeccompFilterSandbox, |
284 switches::kEnableHeapProfiling, | 285 switches::kEnableHeapProfiling, |
285 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. | 286 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. |
286 // Zygote process needs to know what resources to have loaded when it | 287 // Zygote process needs to know what resources to have loaded when it |
287 // becomes a renderer process. | 288 // becomes a renderer process. |
288 switches::kForceDeviceScaleFactor, switches::kLoggingLevel, | 289 switches::kForceDeviceScaleFactor, switches::kLoggingLevel, |
289 switches::kNoSandbox, switches::kPpapiInProcess, | 290 switches::kNoSandbox, switches::kPpapiInProcess, |
290 switches::kRegisterPepperPlugins, switches::kV, switches::kVModule, | 291 switches::kRegisterPepperPlugins, switches::kV, switches::kVModule, |
291 }; | 292 }; |
292 cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches, | 293 cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches, |
293 arraysize(kForwardSwitches)); | 294 arraysize(kForwardSwitches)); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 } | 428 } |
428 if (ReadSandboxStatus() == -1) { | 429 if (ReadSandboxStatus() == -1) { |
429 return 0; | 430 return 0; |
430 } | 431 } |
431 have_read_sandbox_status_word_ = true; | 432 have_read_sandbox_status_word_ = true; |
432 UMA_HISTOGRAM_SPARSE_SLOWLY("Linux.SandboxStatus", sandbox_status_); | 433 UMA_HISTOGRAM_SPARSE_SLOWLY("Linux.SandboxStatus", sandbox_status_); |
433 return sandbox_status_; | 434 return sandbox_status_; |
434 } | 435 } |
435 | 436 |
436 } // namespace content | 437 } // namespace content |
OLD | NEW |