diff options
author | eugenis@google.com <eugenis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-05 08:20:42 +0000 |
---|---|---|
committer | eugenis@google.com <eugenis@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-05 08:20:42 +0000 |
commit | e3fc75abd0267f90d0db326b4dedf769d268cfc1 (patch) | |
tree | b5e5a8bed8182a9bf3ab72115e072ba90b26c4ba /chrome/browser/nacl_host | |
parent | 9493e2bd4f3f8f354b23d6026e96975b09f35c42 (diff) | |
download | chromium_src-e3fc75abd0267f90d0db326b4dedf769d268cfc1.zip chromium_src-e3fc75abd0267f90d0db326b4dedf769d268cfc1.tar.gz chromium_src-e3fc75abd0267f90d0db326b4dedf769d268cfc1.tar.bz2 |
Add --nacl-loader-cmd-prefix option.
BUG=http://code.google.com/p/nativeclient/issues/detail?id=1742
TEST=./out/Debug/chrome --nacl-loader-cmd-prefix='strace -c'
Review URL: http://codereview.chromium.org/6883220
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84221 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/nacl_host')
-rw-r--r-- | chrome/browser/nacl_host/nacl_process_host.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc index 1ab2ddc..4bf7dc2 100644 --- a/chrome/browser/nacl_host/nacl_process_host.cc +++ b/chrome/browser/nacl_host/nacl_process_host.cc @@ -137,8 +137,14 @@ bool NaClProcessHost::LaunchSelLdr() { if (!CreateChannel()) return false; + CommandLine::StringType nacl_loader_prefix; +#if defined(OS_POSIX) + nacl_loader_prefix = CommandLine::ForCurrentProcess()->GetSwitchValueNative( + switches::kNaClLoaderCmdPrefix); +#endif // defined(OS_POSIX) + // Build command line for nacl. - FilePath exe_path = GetChildPath(true); + FilePath exe_path = GetChildPath(nacl_loader_prefix.empty()); if (exe_path.empty()) return false; @@ -150,6 +156,9 @@ bool NaClProcessHost::LaunchSelLdr() { cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); + if (!nacl_loader_prefix.empty()) + cmd_line->PrependWrapper(nacl_loader_prefix); + // On Windows we might need to start the broker process to launch a new loader #if defined(OS_WIN) if (running_on_wow64_) { @@ -159,7 +168,7 @@ bool NaClProcessHost::LaunchSelLdr() { BrowserChildProcessHost::Launch(FilePath(), cmd_line); } #elif defined(OS_POSIX) - BrowserChildProcessHost::Launch(true, // use_zygote + BrowserChildProcessHost::Launch(nacl_loader_prefix.empty(), // use_zygote base::environment_vector(), cmd_line); #endif |