| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_host_impl_linux.h" | 5 #include "content/browser/zygote_host/zygote_host_impl_linux.h" |
| 6 | 6 |
| 7 #include <sys/socket.h> | 7 #include <sys/socket.h> |
| 8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 90 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
| 91 if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) { | 91 if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) { |
| 92 cmd_line.PrependWrapper( | 92 cmd_line.PrependWrapper( |
| 93 browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix)); | 93 browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix)); |
| 94 } | 94 } |
| 95 // Append any switches from the browser process that need to be forwarded on | 95 // Append any switches from the browser process that need to be forwarded on |
| 96 // to the zygote/renderers. | 96 // to the zygote/renderers. |
| 97 // Should this list be obtained from browser_render_process_host.cc? | 97 // Should this list be obtained from browser_render_process_host.cc? |
| 98 static const char* kForwardSwitches[] = { | 98 static const char* kForwardSwitches[] = { |
| 99 switches::kAllowSandboxDebugging, | 99 switches::kAllowSandboxDebugging, |
| 100 switches::kChildCleanExit, |
| 100 switches::kLoggingLevel, | 101 switches::kLoggingLevel, |
| 101 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. | 102 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. |
| 102 switches::kV, | 103 switches::kV, |
| 103 switches::kVModule, | 104 switches::kVModule, |
| 104 switches::kRegisterPepperPlugins, | 105 switches::kRegisterPepperPlugins, |
| 105 switches::kDisableSeccompFilterSandbox, | 106 switches::kDisableSeccompFilterSandbox, |
| 106 | 107 |
| 107 // Zygote process needs to know what resources to have loaded when it | 108 // Zygote process needs to know what resources to have loaded when it |
| 108 // becomes a renderer process. | 109 // becomes a renderer process. |
| 109 switches::kForceDeviceScaleFactor, | 110 switches::kForceDeviceScaleFactor, |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 return RenderSandboxHostLinux::GetInstance()->pid(); | 505 return RenderSandboxHostLinux::GetInstance()->pid(); |
| 505 } | 506 } |
| 506 | 507 |
| 507 int ZygoteHostImpl::GetSandboxStatus() const { | 508 int ZygoteHostImpl::GetSandboxStatus() const { |
| 508 if (have_read_sandbox_status_word_) | 509 if (have_read_sandbox_status_word_) |
| 509 return sandbox_status_; | 510 return sandbox_status_; |
| 510 return 0; | 511 return 0; |
| 511 } | 512 } |
| 512 | 513 |
| 513 } // namespace content | 514 } // namespace content |
| OLD | NEW |