summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 05:59:57 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 05:59:57 +0000
commit05076ba206e040b31fdb41a39cc10a2ecc4adf9d (patch)
tree58c20da4c63a0384c2241b5ddd676a6b7bddf927 /chrome/browser/first_run
parent4c4aae74e9f32f7ff06226b3d5e2fd1723127913 (diff)
downloadchromium_src-05076ba206e040b31fdb41a39cc10a2ecc4adf9d.zip
chromium_src-05076ba206e040b31fdb41a39cc10a2ecc4adf9d.tar.gz
chromium_src-05076ba206e040b31fdb41a39cc10a2ecc4adf9d.tar.bz2
Convert a bunch of easy AppendSwitchWithValue to *ASCII.
For this patch, I skipped over any instance where it wasn't a nearly trivial change. Review URL: http://codereview.chromium.org/3069014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54285 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run')
-rw-r--r--chrome/browser/first_run/first_run_gtk.cc12
-rw-r--r--chrome/browser/first_run/first_run_win.cc13
2 files changed, 11 insertions, 14 deletions
diff --git a/chrome/browser/first_run/first_run_gtk.cc b/chrome/browser/first_run/first_run_gtk.cc
index d758585..d533823 100644
--- a/chrome/browser/first_run/first_run_gtk.cc
+++ b/chrome/browser/first_run/first_run_gtk.cc
@@ -113,7 +113,7 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
return false;
}
-// TODO(port): This is just a piece of the silent import functionality from
+// TODO(port): This is just a piece of the silent import functionality from
// ImportSettings for Windows. It would be nice to get the rest of it ported.
bool FirstRun::ImportBookmarks(const std::wstring& import_bookmarks_path) {
const CommandLine& cmdline = *CommandLine::ForCurrentProcess();
@@ -121,16 +121,14 @@ bool FirstRun::ImportBookmarks(const std::wstring& import_bookmarks_path) {
// Propagate user data directory switch.
if (cmdline.HasSwitch(switches::kUserDataDir)) {
- import_cmd.AppendSwitchWithValue(
- switches::kUserDataDir,
- cmdline.GetSwitchValueASCII(switches::kUserDataDir));
+ import_cmd.AppendSwitchPath(switches::kUserDataDir,
+ cmdline.GetSwitchValuePath(switches::kUserDataDir));
}
// 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());
import_cmd.CommandLine::AppendSwitchWithValue(
switches::kImportFromFile, import_bookmarks_path);
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 2c22c42..9790558 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));
}