Add testing/scripts/OWNERS
[chromium-blink-merge.git] / components / nacl / common / nacl_cmd_line.cc
blob7ecb67424f2d2cfd902f669373c9886ed734bc14
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
3 // found in the LICENSE file.
5 #include "base/base_switches.h"
6 #include "base/basictypes.h"
7 #include "base/command_line.h"
8 #include "components/nacl/common/nacl_switches.h"
9 #include "content/public/common/content_switches.h"
11 namespace nacl {
13 void CopyNaClCommandLineArguments(CommandLine* cmd_line) {
14 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
16 // Propagate the following switches to the NaCl loader command line (along
17 // with any associated values) if present in the browser command line.
18 // TODO(gregoryd): check which flags of those below can be supported.
19 static const char* const kSwitchNames[] = {
20 switches::kNoSandbox,
21 switches::kDisableBreakpad,
22 switches::kFullMemoryCrashReport,
23 switches::kEnableLogging,
24 switches::kDisableLogging,
25 switches::kLoggingLevel,
26 switches::kNoErrorDialogs,
27 #if defined(OS_MACOSX)
28 switches::kEnableSandboxLogging,
29 #endif
31 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
32 arraysize(kSwitchNames));
35 } // namespace nacl