Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1744)

Unified Diff: Source/platform/win/SystemInfo.cpp

Issue 39693002: Introduce isWindowsVistaOrGreater() as replacement of windowsVersion() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/win/SystemInfo.cpp
diff --git a/Source/platform/win/SystemInfo.cpp b/Source/platform/win/SystemInfo.cpp
index 553f27e076591ccc24b19447836c0bb62848f456..e3016ab68027f1137bd222d196380f84e8040170 100644
--- a/Source/platform/win/SystemInfo.cpp
+++ b/Source/platform/win/SystemInfo.cpp
@@ -41,7 +41,15 @@ WindowsVersion windowsVersion(int* major, int* minor)
OSVERSIONINFOEX versionInfo;
ZeroMemory(&versionInfo, sizeof(versionInfo));
versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
+#ifdef _WIN32_WINNT_WINBLUE
+// Since Win SDK 8.1, GetVersionEx() is deprecated.
+#pragma warning(push)
+#pragma warning(disable: 4996)
+#endif
GetVersionEx(reinterpret_cast<OSVERSIONINFO*>(&versionInfo));
yukawa 2013/10/24 11:35:38 Just FYI, you can also suppress warning only in on
+#ifdef _WIN32_WINNT_WINBLUE
+#pragma warning(pop)
+#endif
majorVersion = versionInfo.dwMajorVersion;
minorVersion = versionInfo.dwMinorVersion;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698