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:53:52 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 18:53:52 +0000
commitd5937dff5bfa06d68262fc6d569cd5f5a6ac57c4 (patch)
tree1e5eb583fb086699df3db28c776b88f655625784 /chrome/browser
parent3a29e2911047223baf873271abacf5ae34502fc6 (diff)
downloadchromium_src-d5937dff5bfa06d68262fc6d569cd5f5a6ac57c4.zip
chromium_src-d5937dff5bfa06d68262fc6d569cd5f5a6ac57c4.tar.gz
chromium_src-d5937dff5bfa06d68262fc6d569cd5f5a6ac57c4.tar.bz2
Revert "installer: clean up to use FilePath instead of std::wstring."
This reverts commit 9da05365beb211e3879e6049547e5e92c4c0a5a2 (r32811). TBR=thiago.farina@gmail.com BUG=32811 Review URL: http://codereview.chromium.org/437011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32817 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, 16 insertions, 9 deletions
diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc
index 0aaf6265..dca1bba 100644
--- a/chrome/browser/browser_main_win.cc
+++ b/chrome/browser/browser_main_win.cc
@@ -173,9 +173,12 @@ int HandleIconsCommands(const CommandLine &parsed_command_line) {
bool CheckMachineLevelInstall() {
scoped_ptr<installer::Version> version(InstallUtil::GetChromeVersion(true));
if (version.get()) {
- FilePath exe;
+ std::wstring exe;
PathService::Get(base::DIR_EXE, &exe);
- FilePath user_exe_path(installer::GetChromeInstallPath(false));
+ 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);
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 2bee4a2..5cddc0f 100644
--- a/chrome/browser/google_update.cc
+++ b/chrome/browser/google_update.cc
@@ -32,14 +32,18 @@ bool CanUpdateCurrentChrome(const std::wstring& chrome_exe_path) {
#if !defined(GOOGLE_CHROME_BUILD)
return false;
#else
- 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) {
+ 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 ) {
LOG(ERROR) << L"Google Update cannot update Chrome installed in a "
- << 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".";
+ << 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".";
return false;
}