diff options
author | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-01 18:57:09 +0000 |
---|---|---|
committer | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-01 18:57:09 +0000 |
commit | 103607e7bb3d18c9c5b78cf8dc558c2504047b1d (patch) | |
tree | 650fd33a0dfeded9eec339c24856307de5a86248 /chrome/common/nacl_cmd_line.cc | |
parent | 20c01928492aca53ee6ba6e1c84a199e889cb74d (diff) | |
download | chromium_src-103607e7bb3d18c9c5b78cf8dc558c2504047b1d.zip chromium_src-103607e7bb3d18c9c5b78cf8dc558c2504047b1d.tar.gz chromium_src-103607e7bb3d18c9c5b78cf8dc558c2504047b1d.tar.bz2 |
Implement the broker process that launches NaCl loader processes on 64-bit Windows systems.
BUG=28176
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=37578
Review URL: http://codereview.chromium.org/542030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37720 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/nacl_cmd_line.cc')
-rw-r--r-- | chrome/common/nacl_cmd_line.cc | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/chrome/common/nacl_cmd_line.cc b/chrome/common/nacl_cmd_line.cc new file mode 100644 index 0000000..2212c68 --- /dev/null +++ b/chrome/common/nacl_cmd_line.cc @@ -0,0 +1,44 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/command_line.h" +#include "chrome/common/chrome_constants.h" +#include "chrome/common/chrome_switches.h" +#include "chrome/common/logging_chrome.h" + +namespace nacl { + void CopyNaClCommandLineArguments(CommandLine* cmd_line) { + const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); + if (logging::DialogsAreSuppressed()) + cmd_line->AppendSwitch(switches::kNoErrorDialogs); + + // Propagate the following switches to the NaCl loader command line (along + // with any associated values) if present in the browser command line. + // TODO(gregoryd): check which flags of those below can be supported. + static const char* const switch_names[] = { + switches::kNoSandbox, + switches::kTestSandbox, + switches::kDisableBreakpad, + switches::kFullMemoryCrashReport, + switches::kEnableLogging, + switches::kDisableLogging, + switches::kLoggingLevel, + switches::kEnableDCHECK, + switches::kSilentDumpOnDCHECK, + switches::kMemoryProfiling, +#if defined(OS_MACOSX) + // TODO(dspringer): remove this when NaCl x86-32 security issues are fixed + switches::kEnableNaClOnMac, +#endif + }; + + for (size_t i = 0; i < arraysize(switch_names); ++i) { + if (browser_command_line.HasSwitch(switch_names[i])) { + cmd_line->AppendSwitchWithValue( + switch_names[i], + browser_command_line.GetSwitchValueASCII(switch_names[i])); + } + } + } +} |