OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "components/nacl/common/nacl_delegate.h" | |
6 | |
7 #include "base/base_switches.h" | |
5 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 9 #include "base/command_line.h" |
7 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
11 #include "components/nacl/common/nacl_delegate.h" | |
12 #include "components/nacl/common/nacl_switches.h" | |
13 #include "content/public/common/content_switches.h" | |
8 | 14 |
9 namespace nacl { | 15 void NaClDelegate::CopyNaClCommandLineArguments(CommandLine* cmd_line) { |
10 | 16 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
11 void CopyNaClCommandLineArguments(CommandLine* cmd_line) { | |
12 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | |
13 | 17 |
14 // Propagate the following switches to the NaCl loader command line (along | 18 // Propagate the following switches to the NaCl loader command line (along |
15 // with any associated values) if present in the browser command line. | 19 // with any associated values) if present in the browser command line. |
16 // TODO(gregoryd): check which flags of those below can be supported. | 20 // TODO(gregoryd): check which flags of those below can be supported. |
17 static const char* const kSwitchNames[] = { | 21 static const char* const kSwitchNames[] = { |
18 switches::kNoSandbox, | 22 switches::kNoSandbox, |
19 switches::kTestNaClSandbox, | 23 switches::kTestNaClSandbox, |
20 switches::kDisableBreakpad, | 24 switches::kDisableBreakpad, |
21 switches::kFullMemoryCrashReport, | 25 switches::kFullMemoryCrashReport, |
22 switches::kEnableLogging, | 26 switches::kEnableLogging, |
23 switches::kDisableLogging, | 27 switches::kDisableLogging, |
24 switches::kLoggingLevel, | 28 switches::kLoggingLevel, |
25 switches::kEnableDCHECK, | 29 switches::kEnableDCHECK, |
26 switches::kSilentDumpOnDCHECK, | 30 switches::kSilentDumpOnDCHECK, |
27 switches::kMemoryProfiling, | 31 switches::kMemoryProfiling, |
jam
2013/06/17 20:10:43
these two switches are the only ones that are in c
yael.aharon1
2013/06/19 20:38:52
I removed the 2 switches.
| |
28 switches::kNoErrorDialogs, | 32 switches::kNoErrorDialogs, |
29 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
30 switches::kEnableSandboxLogging, | 34 switches::kEnableSandboxLogging, |
31 #endif | 35 #endif |
32 }; | 36 }; |
33 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 37 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
34 arraysize(kSwitchNames)); | 38 arraysize(kSwitchNames)); |
35 } | 39 } |
36 | 40 |
37 } // namespace nacl | 41 NaClDelegate* GetNaClDelegate() { |
42 static NaClDelegate* naclDelegate = new NaClDelegate; | |
43 return naclDelegate; | |
44 } | |
OLD | NEW |