Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7972)

Unified Diff: chrome_frame/test/chrome_frame_test_utils.cc

Issue 3134008: CommandLine: eliminate wstring-accepting AppendLooseValue (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: utf8 Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome_frame/test/chrome_frame_test_utils.cc
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index 5f59f6cc7086e73ac153c5f55420b8b46433f3cf..f5b131565804a1d00a4631428a095f606dcc9d4a 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -159,7 +159,7 @@ base::ProcessHandle LaunchExecutable(const std::wstring& executable,
}
} else {
CommandLine cmdline((FilePath(path)));
- cmdline.AppendLooseValue(argument);
+ cmdline.AppendArgNative(argument);
if (!base::LaunchApp(cmdline, false, false, &process)) {
LOG(ERROR) << "LaunchApp failed: " << ::GetLastError();
}
@@ -181,11 +181,8 @@ base::ProcessHandle LaunchChrome(const std::wstring& url) {
path = path.AppendASCII(kChromeImageName);
CommandLine cmd(path);
- std::wstring args = L"--";
- args += ASCIIToWide(switches::kNoFirstRun);
- args += L" ";
- args += url;
- cmd.AppendLooseValue(args);
+ cmd.AppendSwitch(switches::kNoFirstRun);
+ cmd.AppendArgNative(url);
base::ProcessHandle process = NULL;
base::LaunchApp(cmd, false, false, &process);

Powered by Google App Engine
This is Rietveld 408576698