OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/basictypes.h" | |
6 #include "base/command_line.h" | |
7 #include "chrome/common/chrome_switches.h" | |
8 | |
9 namespace nacl { | |
10 | |
11 void CopyNaClCommandLineArguments(CommandLine* cmd_line) { | |
12 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | |
13 | |
14 // Propagate the following switches to the NaCl loader command line (along | |
15 // with any associated values) if present in the browser command line. | |
16 // TODO(gregoryd): check which flags of those below can be supported. | |
17 static const char* const kSwitchNames[] = { | |
18 switches::kNoSandbox, | |
19 switches::kTestNaClSandbox, | |
20 switches::kDisableBreakpad, | |
21 switches::kFullMemoryCrashReport, | |
22 switches::kEnableLogging, | |
23 switches::kDisableLogging, | |
24 switches::kLoggingLevel, | |
25 switches::kEnableDCHECK, | |
26 switches::kSilentDumpOnDCHECK, | |
27 switches::kMemoryProfiling, | |
28 switches::kNoErrorDialogs, | |
29 #if defined(OS_MACOSX) | |
30 switches::kEnableSandboxLogging, | |
31 #endif | |
32 }; | |
33 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | |
34 arraysize(kSwitchNames)); | |
35 } | |
36 | |
37 } // namespace nacl | |
OLD | NEW |