summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/install_util.cc
diff options
context:
space:
mode:
authorsiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-16 19:12:09 +0000
committersiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-16 19:12:09 +0000
commitfa8089e080f811d77f177cfbe0f41f39506114b0 (patch)
tree5dc8e5e9c80d9a5ccd1fa699a546a2a31b350c38 /chrome/installer/util/install_util.cc
parent1e652d0226fa331b2bd80ab7f94e6c4d043c729b (diff)
downloadchromium_src-fa8089e080f811d77f177cfbe0f41f39506114b0.zip
chromium_src-fa8089e080f811d77f177cfbe0f41f39506114b0.tar.gz
chromium_src-fa8089e080f811d77f177cfbe0f41f39506114b0.tar.bz2
Make sure GoogleUpdateSettings::GetChromeChannel does not read
from the wrong section of registry when a per-user install has left some registrations behind. Fix the odd race and other bugs I encountered along the way. BUG=40994 TEST=Unittests in this change. Open about box and look at the channel string. Review URL: http://codereview.chromium.org/1582035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44805 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/install_util.cc')
-rw-r--r--chrome/installer/util/install_util.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index a3f32d1..1f22cd6 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -124,7 +124,9 @@ bool InstallUtil::IsPerUserInstall(const wchar_t* const exe_path) {
wchar_t program_files_path[MAX_PATH] = {0};
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL,
SHGFP_TYPE_CURRENT, program_files_path))) {
- return !StartsWith(exe_path, program_files_path, false);
+ std::wstring program_files(program_files_path);
+ std::wstring exe_path_truncated(exe_path, program_files.size());
+ return !FilePath::CompareEqualIgnoreCase(program_files, exe_path_truncated);
} else {
NOTREACHED();
}