diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 01:23:00 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 01:23:00 +0000 |
commit | 660e428f4baafdd433f978f7e4074677611f0de9 (patch) | |
tree | 6c73e5446b8b9699b3fa69fd44bf75f098b6f8f5 /chrome/browser/first_run | |
parent | f13997f0122a7584f3205a8c5a117007f557e951 (diff) | |
download | chromium_src-660e428f4baafdd433f978f7e4074677611f0de9.zip chromium_src-660e428f4baafdd433f978f7e4074677611f0de9.tar.gz chromium_src-660e428f4baafdd433f978f7e4074677611f0de9.tar.bz2 |
Remove usage of GetSwitchValue for most of chrome/browser/.
Review URL: http://codereview.chromium.org/3005053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54856 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run')
-rw-r--r-- | chrome/browser/first_run/first_run_win.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc index afac507..4a94da6 100644 --- a/chrome/browser/first_run/first_run_win.cc +++ b/chrome/browser/first_run/first_run_win.cc @@ -586,21 +586,21 @@ 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, +bool DecodeImportParams(const std::string& encoded, int* browser_type, int* options, HWND* window) { - std::vector<std::wstring> v; - SplitString(encoded, L'@', &v); - if (v.size() != 3) + std::vector<std::string> parts; + SplitString(encoded, '@', &parts); + if (parts.size() != 3) return false; - if (!base::StringToInt(WideToUTF16Hack(v[0]), browser_type)) + if (!base::StringToInt(parts[0], browser_type)) return false; - if (!base::StringToInt(WideToUTF16Hack(v[1]), options)) + if (!base::StringToInt(parts[1], options)) return false; int64 window_int; - base::StringToInt64(WideToUTF16Hack(v[2]), &window_int); + base::StringToInt64(parts[2], &window_int); *window = reinterpret_cast<HWND>(window_int); return true; } @@ -742,7 +742,7 @@ bool FirstRun::ImportSettings(Profile* profile, int browser_type, int FirstRun::ImportFromBrowser(Profile* profile, const CommandLine& cmdline) { - std::wstring import_info = cmdline.GetSwitchValue(switches::kImport); + std::string import_info = cmdline.GetSwitchValueASCII(switches::kImport); if (import_info.empty()) { NOTREACHED(); return false; |