| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_linux.h" | 5 #include "content/browser/zygote_host_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 cmd_line.PrependWrapper( | 90 cmd_line.PrependWrapper( |
| 91 browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix)); | 91 browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix)); |
| 92 } | 92 } |
| 93 // Append any switches from the browser process that need to be forwarded on | 93 // Append any switches from the browser process that need to be forwarded on |
| 94 // to the zygote/renderers. | 94 // to the zygote/renderers. |
| 95 // Should this list be obtained from browser_render_process_host.cc? | 95 // Should this list be obtained from browser_render_process_host.cc? |
| 96 static const char* kForwardSwitches[] = { | 96 static const char* kForwardSwitches[] = { |
| 97 switches::kAllowSandboxDebugging, | 97 switches::kAllowSandboxDebugging, |
| 98 switches::kLoggingLevel, | 98 switches::kLoggingLevel, |
| 99 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. | 99 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. |
| 100 switches::kEnableRemoting, |
| 100 switches::kV, | 101 switches::kV, |
| 101 switches::kVModule, | 102 switches::kVModule, |
| 102 switches::kUserDataDir, // Make logs go to the right file. | 103 switches::kUserDataDir, // Make logs go to the right file. |
| 103 // Load (in-process) Pepper plugins in-process in the zygote pre-sandbox. | 104 // Load (in-process) Pepper plugins in-process in the zygote pre-sandbox. |
| 104 switches::kPpapiFlashPath, | 105 switches::kPpapiFlashPath, |
| 105 switches::kPpapiFlashVersion, | 106 switches::kPpapiFlashVersion, |
| 106 switches::kRegisterPepperPlugins, | 107 switches::kRegisterPepperPlugins, |
| 107 switches::kDisableSeccompSandbox, | 108 switches::kDisableSeccompSandbox, |
| 108 switches::kEnableSeccompSandbox, | 109 switches::kEnableSeccompSandbox, |
| 109 }; | 110 }; |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 !read_pickle.ReadInt(&iter, &tmp_exit_code)) { | 356 !read_pickle.ReadInt(&iter, &tmp_exit_code)) { |
| 356 LOG(WARNING) << "Error parsing GetTerminationStatus response from zygote."; | 357 LOG(WARNING) << "Error parsing GetTerminationStatus response from zygote."; |
| 357 return base::TERMINATION_STATUS_NORMAL_TERMINATION; | 358 return base::TERMINATION_STATUS_NORMAL_TERMINATION; |
| 358 } | 359 } |
| 359 | 360 |
| 360 if (exit_code) | 361 if (exit_code) |
| 361 *exit_code = tmp_exit_code; | 362 *exit_code = tmp_exit_code; |
| 362 | 363 |
| 363 return static_cast<base::TerminationStatus>(status); | 364 return static_cast<base::TerminationStatus>(status); |
| 364 } | 365 } |
| OLD | NEW |