summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 18:10:13 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 18:10:13 +0000
commitd54030f704e1050a052a56515a007e1787793037 (patch)
tree9ecc9b80eee4891ea599fd44521e81029e609e88 /chrome/browser
parent7f1f8e39214e49ea62c3038f886b4df540aadb42 (diff)
downloadchromium_src-d54030f704e1050a052a56515a007e1787793037.zip
chromium_src-d54030f704e1050a052a56515a007e1787793037.tar.gz
chromium_src-d54030f704e1050a052a56515a007e1787793037.tar.bz2
installer: clean up to use FilePath instead of std::wstring.
BUG=24672 TEST=installer_util_unittests and setup_unittests Review URL: http://codereview.chromium.org/385129 Patch from Thiago Farina <thiago.farina@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_main_win.cc7
-rw-r--r--chrome/browser/google_update.cc18
2 files changed, 9 insertions, 16 deletions
diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc
index dca1bba..0aaf6265 100644
--- a/chrome/browser/browser_main_win.cc
+++ b/chrome/browser/browser_main_win.cc
@@ -173,12 +173,9 @@ int HandleIconsCommands(const CommandLine &parsed_command_line) {
bool CheckMachineLevelInstall() {
scoped_ptr<installer::Version> version(InstallUtil::GetChromeVersion(true));
if (version.get()) {
- std::wstring exe;
+ FilePath exe;
PathService::Get(base::DIR_EXE, &exe);
- std::transform(exe.begin(), exe.end(), exe.begin(), tolower);
- std::wstring user_exe_path = installer::GetChromeInstallPath(false);
- std::transform(user_exe_path.begin(), user_exe_path.end(),
- user_exe_path.begin(), tolower);
+ FilePath user_exe_path(installer::GetChromeInstallPath(false));
if (exe == user_exe_path) {
const std::wstring text =
l10n_util::GetString(IDS_MACHINE_LEVEL_INSTALL_CONFLICT);
diff --git a/chrome/browser/google_update.cc b/chrome/browser/google_update.cc
index 5cddc0f..2bee4a2 100644
--- a/chrome/browser/google_update.cc
+++ b/chrome/browser/google_update.cc
@@ -32,18 +32,14 @@ bool CanUpdateCurrentChrome(const std::wstring& chrome_exe_path) {
#if !defined(GOOGLE_CHROME_BUILD)
return false;
#else
- std::wstring user_exe_path = installer::GetChromeInstallPath(false);
- std::wstring machine_exe_path = installer::GetChromeInstallPath(true);
- std::transform(user_exe_path.begin(), user_exe_path.end(),
- user_exe_path.begin(), tolower);
- std::transform(machine_exe_path.begin(), machine_exe_path.end(),
- machine_exe_path.begin(), tolower);
- if (chrome_exe_path != user_exe_path &&
- chrome_exe_path != machine_exe_path ) {
+ FilePath user_exe_path(installer::GetChromeInstallPath(false));
+ FilePath machine_exe_path(installer::GetChromeInstallPath(true));
+ if (chrome_exe_path != user_exe_path && chrome_exe_path != machine_exe_path) {
LOG(ERROR) << L"Google Update cannot update Chrome installed in a "
- << L"non-standard location: " << chrome_exe_path.c_str()
- << L". The standard location is: " << user_exe_path.c_str()
- << L" or " << machine_exe_path.c_str() << L".";
+ << L"non-standard location: " << chrome_exe_path.value().c_str()
+ << L". The standard location is: "
+ << user_exe_path.value().c_str()
+ << L" or " << machine_exe_path.value().c_str() << L".";
return false;
}