diff options
-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); |