diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 03:16:38 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 03:16:38 +0000 |
commit | 38a0e3a3af10f1962885ea9a6dce6673e82085e7 (patch) | |
tree | a9d4ede8ee8dc0fdca07c9b60beb430e63f39753 | |
parent | dcdfa97ed0e5a2961f2834d37f1a2db4a6649b29 (diff) | |
download | chromium_src-38a0e3a3af10f1962885ea9a6dce6673e82085e7.zip chromium_src-38a0e3a3af10f1962885ea9a6dce6673e82085e7.tar.gz chromium_src-38a0e3a3af10f1962885ea9a6dce6673e82085e7.tar.bz2 |
According to reports in the field, some XP machines have a registry flag that says "Disable UAC". Possibly, this is governed by a policy setting on corporate networks.
In any case, this causes the About box to think we can't perform on-demand updates. We should never block on-demand updates on XP.
Review URL: http://codereview.chromium.org/2901
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2297 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/win_util.h | 9 | ||||
-rw-r--r-- | chrome/browser/views/about_chrome_view.cc | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/base/win_util.h b/base/win_util.h index d3728c1..4d1891f 100644 --- a/base/win_util.h +++ b/base/win_util.h @@ -84,9 +84,12 @@ bool IsAltPressed(); // std::wstring. An empty result indicates a failure to get the class name. std::wstring GetClassName(HWND window); -// Returns false if the computer is running Vista and the user account control -// is disabled. Returns true if user account control is enabled or the machine -// is not running vista. +// Returns false if user account control (UAC) has been disabled with the +// EnableLUA registry flag. Returns true if user account control is enabled. +// NOTE: The EnableLUA registry flag, which is ignored on Windows XP +// machines, might still exist and be set to 0 (UAC disabled), in which case +// this function will return false. You should therefore check this flag only +// if the OS is Vista. bool UserAccountControlIsEnabled(); } // namespace win_util diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc index 02eb5ce..5d648a6 100644 --- a/chrome/browser/views/about_chrome_view.cc +++ b/chrome/browser/views/about_chrome_view.cc @@ -259,6 +259,7 @@ void AboutChromeView::ViewHierarchyChanged(bool is_add, int service_pack_major = 0, service_pack_minor = 0; win_util::GetServicePackLevel(&service_pack_major, &service_pack_minor); if (win_util::UserAccountControlIsEnabled() || + win_util::GetWinVersion() == win_util::WINVERSION_XP || (win_util::GetWinVersion() == win_util::WINVERSION_VISTA && service_pack_major >= 1)) { UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); |