diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-29 23:02:34 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-29 23:02:34 +0000 |
commit | 4f08c83f354cb0c9d2ee5c79c39c1ad08e560cdf (patch) | |
tree | 41963c12afc6c484be43d69d1c31c242ed5b7488 /chrome/test/nacl | |
parent | d7ab056d66464c89ba336c4b466a8ad45f2afb6e (diff) | |
download | chromium_src-4f08c83f354cb0c9d2ee5c79c39c1ad08e560cdf.zip chromium_src-4f08c83f354cb0c9d2ee5c79c39c1ad08e560cdf.tar.gz chromium_src-4f08c83f354cb0c9d2ee5c79c39c1ad08e560cdf.tar.bz2 |
CommandLine: add a CopySwitchesFrom() and AppendSwitchPath()
These are two common patterns in Chrome code: copying a
subset of switches from one CommandLine to another, and
appending a FilePath to a CommandLine. This sets me up
to do a lot more deprecation in a follow-up change.
Review URL: http://codereview.chromium.org/3012021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54218 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/nacl')
-rw-r--r-- | chrome/test/nacl/nacl_sandbox_test.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/chrome/test/nacl/nacl_sandbox_test.cc b/chrome/test/nacl/nacl_sandbox_test.cc index 41aa97a..2517403 100644 --- a/chrome/test/nacl/nacl_sandbox_test.cc +++ b/chrome/test/nacl/nacl_sandbox_test.cc @@ -18,18 +18,16 @@ const FilePath::CharType kSrpcHwHtmlFileName[] = NaClSandboxTest::NaClSandboxTest() : NaClTest() { // Append the --test-nacl-sandbox=$TESTDLL flag before launching. - FilePath dylibDir; - PathService::Get(base::DIR_EXE, &dylibDir); + FilePath dylib_dir; + PathService::Get(base::DIR_EXE, &dylib_dir); #if defined(OS_MACOSX) - dylibDir = dylibDir.AppendASCII("libnacl_security_tests.dylib"); - launch_arguments_.AppendSwitchWithValue(switches::kTestNaClSandbox, - dylibDir.value()); + dylib_dir = dylib_dir.AppendASCII("libnacl_security_tests.dylib"); + launch_arguments_.AppendSwitchPath(switches::kTestNaClSandbox, dylib_dir); #elif defined(OS_WIN) // Let the NaCl process detect if it is 64-bit or not and hack on // the appropriate suffix to this dll. - dylibDir = dylibDir.AppendASCII("nacl_security_tests"); - launch_arguments_.AppendSwitchWithValue(switches::kTestNaClSandbox, - dylibDir.value()); + dylib_dir = dylib_dir.AppendASCII("nacl_security_tests"); + launch_arguments_.AppendSwitchPath(switches::kTestNaClSandbox, dylib_dir); #elif defined(OS_LINUX) // We currently do not test the Chrome Linux SUID or seccomp sandboxes. #endif |