From 8cb6d4b7ee925251eec33eea82d03108a899350b Mon Sep 17 00:00:00 2001 From: Masatoshi Kimura Date: Fri, 22 Nov 2013 12:35:39 +0900 Subject: [PATCH] Bug 925599 - Replace other GetVersionEx() uses. r=jimm --- .../components/shell/src/nsWindowsShellService.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/browser/components/shell/src/nsWindowsShellService.cpp b/browser/components/shell/src/nsWindowsShellService.cpp index e0cc7ca6a12f..0453ba021b18 100644 --- a/browser/components/shell/src/nsWindowsShellService.cpp +++ b/browser/components/shell/src/nsWindowsShellService.cpp @@ -27,6 +27,7 @@ #include "nsISupportsPrimitives.h" #include "nsThreadUtils.h" #include "nsXULAppAPI.h" +#include "mozilla/WindowsVersion.h" #include "windows.h" #include "shellapi.h" @@ -53,6 +54,8 @@ #define NS_TASKBAR_CONTRACTID "@mozilla.org/windows-taskbar;1" +using mozilla::IsWin8OrLater; + NS_IMPL_ISUPPORTS2(nsWindowsShellService, nsIWindowsShellService, nsIShellService) static nsresult @@ -314,16 +317,6 @@ nsWindowsShellService::ShortcutMaintenance() return LaunchHelper(appHelperPath); } -static bool -IsWin8OrLater() -{ - OSVERSIONINFOW osInfo; - osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); - GetVersionExW(&osInfo); - return osInfo.dwMajorVersion > 6 || - (osInfo.dwMajorVersion >= 6 && osInfo.dwMinorVersion >= 2); -} - static bool IsAARDefaultHTTP(IApplicationAssociationRegistration* pAAR, bool* aIsDefaultBrowser)