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

Unified Diff: chrome/browser/first_run/first_run_win.cc

Issue 3069014: Convert a bunch of easy AppendSwitchWithValue to *ASCII. (Closed)
Patch Set: fix Created 10 years, 5 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/browser/first_run/first_run_win.cc
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 2c22c424a077676ceef13f7650f98bbd944c521f..9790558e2c690c9402883750ab9cfb2432de47c2 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -135,7 +135,7 @@ bool LaunchSetupWithParam(const std::string& param, const std::wstring& value,
exe_path = exe_path.Append(installer_util::kSetupExe);
base::ProcessHandle ph;
CommandLine cl(exe_path);
- cl.AppendSwitchWithValue(param, value);
+ cl.AppendSwitchNative(param, value);
CommandLine* browser_command_line = CommandLine::ForCurrentProcess();
if (browser_command_line->HasSwitch(switches::kChromeFrame)) {
@@ -580,8 +580,8 @@ class HungImporterMonitor : public WorkerThreadTicker::Callback {
DISALLOW_COPY_AND_ASSIGN(HungImporterMonitor);
};
-std::wstring EncodeImportParams(int browser_type, int options, HWND window) {
- return StringPrintf(L"%d@%d@%d", browser_type, options, window);
+std::string EncodeImportParams(int browser_type, int options, HWND window) {
+ return StringPrintf("%d@%d@%d", browser_type, options, window);
}
bool DecodeImportParams(const std::wstring& encoded,
@@ -693,12 +693,11 @@ bool FirstRun::ImportSettings(Profile* profile, int browser_type,
// Since ImportSettings is called before the local state is stored on disk
// we pass the language as an argument. GetApplicationLocale checks the
// current command line as fallback.
- import_cmd.AppendSwitchWithValue(
- switches::kLang,
- ASCIIToWide(g_browser_process->GetApplicationLocale()));
+ import_cmd.AppendSwitchASCII(switches::kLang,
+ g_browser_process->GetApplicationLocale());
if (items_to_import) {
- import_cmd.CommandLine::AppendSwitchWithValue(switches::kImport,
+ import_cmd.CommandLine::AppendSwitchASCII(switches::kImport,
EncodeImportParams(browser_type, items_to_import, parent_window));
}

Powered by Google App Engine
This is Rietveld 408576698