Bug 925599 - Replace other GetVersionEx() uses. r=jimm

This commit is contained in:
Masatoshi Kimura 2013-11-22 12:35:39 +09:00
parent 76985474ec
commit 8cb6d4b7ee

View File

@ -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)