| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 base::LaunchOptions options; | 272 base::LaunchOptions options; |
| 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* const kForwardSwitches[] = { |
| 283 switches::kAllowSandboxDebugging, switches::kAndroidFontsPath, | 283 switches::kAllowSandboxDebugging, switches::kAndroidFontsPath, |
| 284 switches::kDisableSeccompFilterSandbox, | 284 switches::kDisableSeccompFilterSandbox, |
| 285 switches::kEnableHeapProfiling, | 285 switches::kEnableHeapProfiling, |
| 286 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. | 286 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. |
| 287 // 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 |
| 288 // becomes a renderer process. | 288 // becomes a renderer process. |
| 289 switches::kForceDeviceScaleFactor, switches::kLoggingLevel, | 289 switches::kForceDeviceScaleFactor, switches::kLoggingLevel, |
| 290 switches::kNoSandbox, switches::kPpapiInProcess, | 290 switches::kNoSandbox, switches::kPpapiInProcess, |
| 291 switches::kRegisterPepperPlugins, switches::kV, switches::kVModule, | 291 switches::kRegisterPepperPlugins, switches::kV, switches::kVModule, |
| 292 }; | 292 }; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 } | 428 } |
| 429 if (ReadSandboxStatus() == -1) { | 429 if (ReadSandboxStatus() == -1) { |
| 430 return 0; | 430 return 0; |
| 431 } | 431 } |
| 432 have_read_sandbox_status_word_ = true; | 432 have_read_sandbox_status_word_ = true; |
| 433 UMA_HISTOGRAM_SPARSE_SLOWLY("Linux.SandboxStatus", sandbox_status_); | 433 UMA_HISTOGRAM_SPARSE_SLOWLY("Linux.SandboxStatus", sandbox_status_); |
| 434 return sandbox_status_; | 434 return sandbox_status_; |
| 435 } | 435 } |
| 436 | 436 |
| 437 } // namespace content | 437 } // namespace content |
| OLD | NEW |