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/ui_test_utils.cc | |
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/ui_test_utils.cc')
-rw-r--r-- | chrome/test/ui_test_utils.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc index 8e11ebf..a1abccd 100644 --- a/chrome/test/ui_test_utils.cc +++ b/chrome/test/ui_test_utils.cc @@ -618,11 +618,10 @@ TestWebSocketServer::TestWebSocketServer(const FilePath& root_directory) { cmd_line->AppendSwitchWithValue("server", "start"); cmd_line->AppendSwitch("chromium"); cmd_line->AppendSwitch("register_cygwin"); - cmd_line->AppendSwitchWithValue("root", root_directory.ToWStringHack()); + cmd_line->AppendSwitchPath("root", root_directory); temp_dir_.CreateUniqueTempDir(); websocket_pid_file_ = temp_dir_.path().AppendASCII("websocket.pid"); - cmd_line->AppendSwitchWithValue("pidfile", - websocket_pid_file_.ToWStringHack()); + cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_); SetPythonPath(); base::LaunchApp(*cmd_line.get(), true, false, NULL); } @@ -664,8 +663,7 @@ TestWebSocketServer::~TestWebSocketServer() { scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine()); cmd_line->AppendSwitchWithValue("server", "stop"); cmd_line->AppendSwitch("chromium"); - cmd_line->AppendSwitchWithValue("pidfile", - websocket_pid_file_.ToWStringHack()); + cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_); base::LaunchApp(*cmd_line.get(), true, false, NULL); } |