| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // to the zygote/renderers. | 93 // to the zygote/renderers. |
| 94 // Should this list be obtained from browser_render_process_host.cc? | 94 // Should this list be obtained from browser_render_process_host.cc? |
| 95 static const char* kForwardSwitches[] = { | 95 static const char* kForwardSwitches[] = { |
| 96 switches::kAllowSandboxDebugging, | 96 switches::kAllowSandboxDebugging, |
| 97 switches::kLoggingLevel, | 97 switches::kLoggingLevel, |
| 98 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. | 98 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. |
| 99 switches::kV, | 99 switches::kV, |
| 100 switches::kVModule, | 100 switches::kVModule, |
| 101 switches::kRegisterPepperPlugins, | 101 switches::kRegisterPepperPlugins, |
| 102 switches::kDisableSeccompSandbox, | 102 switches::kDisableSeccompSandbox, |
| 103 switches::kDisableSeccompFilterSandbox, |
| 103 switches::kEnableSeccompSandbox, | 104 switches::kEnableSeccompSandbox, |
| 104 // Zygote process needs to know what resources to have loaded when it | 105 // Zygote process needs to know what resources to have loaded when it |
| 105 // becomes a renderer process. | 106 // becomes a renderer process. |
| 106 switches::kForceDeviceScaleFactor, | 107 switches::kForceDeviceScaleFactor, |
| 107 switches::kLoad2xResources, | 108 switches::kLoad2xResources, |
| 109 switches::kNoSandbox, |
| 108 }; | 110 }; |
| 109 cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches, | 111 cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches, |
| 110 arraysize(kForwardSwitches)); | 112 arraysize(kForwardSwitches)); |
| 111 | 113 |
| 112 content::GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 114 content::GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
| 113 &cmd_line, -1); | 115 &cmd_line, -1); |
| 114 | 116 |
| 115 sandbox_binary_ = sandbox_cmd.c_str(); | 117 sandbox_binary_ = sandbox_cmd.c_str(); |
| 116 | 118 |
| 117 if (!sandbox_cmd.empty()) { | 119 if (!sandbox_cmd.empty()) { |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 | 478 |
| 477 pid_t ZygoteHostImpl::GetSandboxHelperPid() const { | 479 pid_t ZygoteHostImpl::GetSandboxHelperPid() const { |
| 478 return RenderSandboxHostLinux::GetInstance()->pid(); | 480 return RenderSandboxHostLinux::GetInstance()->pid(); |
| 479 } | 481 } |
| 480 | 482 |
| 481 int ZygoteHostImpl::GetSandboxStatus() const { | 483 int ZygoteHostImpl::GetSandboxStatus() const { |
| 482 if (have_read_sandbox_status_word_) | 484 if (have_read_sandbox_status_word_) |
| 483 return sandbox_status_; | 485 return sandbox_status_; |
| 484 return 0; | 486 return 0; |
| 485 } | 487 } |
| OLD | NEW |