| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/base_switches.h" | 5 #include "base/base_switches.h" |
| 6 #include "base/basictypes.h" | |
| 7 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/macros.h" |
| 8 #include "build/build_config.h" |
| 8 #include "components/nacl/common/nacl_switches.h" | 9 #include "components/nacl/common/nacl_switches.h" |
| 9 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| 10 | 11 |
| 11 namespace nacl { | 12 namespace nacl { |
| 12 | 13 |
| 13 void CopyNaClCommandLineArguments(base::CommandLine* cmd_line) { | 14 void CopyNaClCommandLineArguments(base::CommandLine* cmd_line) { |
| 14 const base::CommandLine& browser_command_line = | 15 const base::CommandLine& browser_command_line = |
| 15 *base::CommandLine::ForCurrentProcess(); | 16 *base::CommandLine::ForCurrentProcess(); |
| 16 | 17 |
| 17 // Propagate the following switches to the NaCl loader command line (along | 18 // Propagate the following switches to the NaCl loader command line (along |
| 18 // with any associated values) if present in the browser command line. | 19 // with any associated values) if present in the browser command line. |
| 19 // TODO(gregoryd): check which flags of those below can be supported. | 20 // TODO(gregoryd): check which flags of those below can be supported. |
| 20 static const char* const kSwitchNames[] = { | 21 static const char* const kSwitchNames[] = { |
| 21 switches::kNoSandbox, | 22 switches::kNoSandbox, |
| 22 switches::kDisableBreakpad, | 23 switches::kDisableBreakpad, |
| 23 switches::kFullMemoryCrashReport, | 24 switches::kFullMemoryCrashReport, |
| 24 switches::kEnableLogging, | 25 switches::kEnableLogging, |
| 25 switches::kDisableLogging, | 26 switches::kDisableLogging, |
| 26 switches::kLoggingLevel, | 27 switches::kLoggingLevel, |
| 27 switches::kNoErrorDialogs, | 28 switches::kNoErrorDialogs, |
| 28 #if defined(OS_MACOSX) | 29 #if defined(OS_MACOSX) |
| 29 switches::kEnableSandboxLogging, | 30 switches::kEnableSandboxLogging, |
| 30 #endif | 31 #endif |
| 31 }; | 32 }; |
| 32 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 33 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 33 arraysize(kSwitchNames)); | 34 arraysize(kSwitchNames)); |
| 34 } | 35 } |
| 35 | 36 |
| 36 } // namespace nacl | 37 } // namespace nacl |
| OLD | NEW |