summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/install_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/installer/util/install_util.cc')
-rw-r--r--chrome/installer/util/install_util.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index a15ac4e..2d6d1d9 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -193,11 +193,13 @@ Version* InstallUtil::GetChromeVersion(BrowserDistribution* dist,
return ret;
}
-Version* InstallUtil::GetCriticalUpdateVersion(BrowserDistribution* dist) {
+Version* InstallUtil::GetCriticalUpdateVersion(BrowserDistribution* dist,
+ bool system_install) {
DCHECK(dist);
RegKey key;
+ HKEY reg_root = (system_install) ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
LONG result =
- key.Open(HKEY_CURRENT_USER, dist->GetVersionKey().c_str(), KEY_READ);
+ key.Open(reg_root, dist->GetVersionKey().c_str(), KEY_QUERY_VALUE);
string16 version_str;
if (result == ERROR_SUCCESS)