Bug 1035125 Part 6: Take Chromium commit 3181ba39ee787e1b40f4aea4be23f4f666ad0945 to add Windows 10 version to enumeration. r=aklotz
authorBob Owen <bobowencode@gmail.com>
Sun, 15 May 2016 16:23:57 +0100
changeset 297624 89c0989d9cf96e6e1462174c9941d5aea66156f9
parent 297623 3b9b7b90c5f4dc1ec36d578bea8b3d29616a21c7
child 297625 477b991bf6fa7b4511768649c9bf37c7275d30d9
push id76830
push userbobowencode@gmail.com
push dateTue, 17 May 2016 07:42:57 +0000
treeherdermozilla-inbound@a416c55e6648 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaklotz
bugs1035125
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1035125 Part 6: Take Chromium commit 3181ba39ee787e1b40f4aea4be23f4f666ad0945 to add Windows 10 version to enumeration. r=aklotz MozReview-Commit-ID: 8sR9F72JJ1k
security/sandbox/chromium/base/win/windows_version.cc
security/sandbox/chromium/base/win/windows_version.h
security/sandbox/moz-chromium-commit-status.txt
--- a/security/sandbox/chromium/base/win/windows_version.cc
+++ b/security/sandbox/chromium/base/win/windows_version.cc
@@ -59,16 +59,18 @@ OSInfo::OSInfo()
         // Treat Windows Server 2012 the same as Windows 8.
         version_ = VERSION_WIN8;
         break;
       default:
         DCHECK_EQ(version_number_.minor, 3);
         version_ = VERSION_WIN8_1;
         break;
     }
+  } else if (version_number_.major == 10) {
+    version_ = VERSION_WIN10;
   } else if (version_number_.major > 6) {
     NOTREACHED();
     version_ = VERSION_WIN_LAST;
   }
   service_pack_.major = version_info.wServicePackMajor;
   service_pack_.minor = version_info.wServicePackMinor;
 
   SYSTEM_INFO system_info = { 0 };
@@ -79,17 +81,17 @@ OSInfo::OSInfo()
     case PROCESSOR_ARCHITECTURE_IA64:  architecture_ = IA64_ARCHITECTURE; break;
   }
   processors_ = system_info.dwNumberOfProcessors;
   allocation_granularity_ = system_info.dwAllocationGranularity;
 
   GetProductInfoPtr get_product_info;
   DWORD os_type;
 
-  if (version_info.dwMajorVersion == 6) {
+  if (version_info.dwMajorVersion == 6 || version_info.dwMajorVersion == 10) {
     // Only present on Vista+.
     get_product_info = reinterpret_cast<GetProductInfoPtr>(
         ::GetProcAddress(::GetModuleHandle(L"kernel32.dll"), "GetProductInfo"));
 
     get_product_info(version_info.dwMajorVersion, version_info.dwMinorVersion,
                      0, 0, &os_type);
     switch (os_type) {
       case PRODUCT_CLUSTER_SERVER:
--- a/security/sandbox/chromium/base/win/windows_version.h
+++ b/security/sandbox/chromium/base/win/windows_version.h
@@ -21,17 +21,18 @@ namespace win {
 // "if (base::win::GetVersion() >= base::win::VERSION_VISTA) ...".
 enum Version {
   VERSION_PRE_XP = 0,  // Not supported.
   VERSION_XP,
   VERSION_SERVER_2003, // Also includes XP Pro x64 and Server 2003 R2.
   VERSION_VISTA,       // Also includes Windows Server 2008.
   VERSION_WIN7,        // Also includes Windows Server 2008 R2.
   VERSION_WIN8,        // Also includes Windows Server 2012.
-  VERSION_WIN8_1,      // Code named Windows Blue
+  VERSION_WIN8_1,      // Also includes Windows Server 2012 R2.
+  VERSION_WIN10,       // Also includes Windows 10 Server.
   VERSION_WIN_LAST,    // Indicates error condition.
 };
 
 // A rough bucketing of the available types of versions of Windows. This is used
 // to distinguish enterprise enabled versions from home versions and potentially
 // server versions.
 enum VersionType {
   SUITE_HOME,
--- a/security/sandbox/moz-chromium-commit-status.txt
+++ b/security/sandbox/moz-chromium-commit-status.txt
@@ -4,8 +4,10 @@ df7cc6c04725630dd4460f29d858a77507343b24
 b533d6533585377edd63ec6500469f6c4fba602a   chromium/sandbox/win/src/sharedmem_ipc_server.cc
 034bd64db1806d85b2ceacc736074ac07722af4a   chromium/sandbox/win/src/service_resolver_64.cc
 de2078cfbbb6770791d32575a1a72a288e6d66a6   chromium/sandbox/win/src/target_services.cc
 de2078cfbbb6770791d32575a1a72a288e6d66a6   chromium/sandbox/win/src/target_services.h
 0e49d029d5a1a25d971880b9e44d67ac70b31a80   chromium/sandbox/win/src/file_policy_test.cc
 0e49d029d5a1a25d971880b9e44d67ac70b31a80   chromium/sandbox/win/src/filesystem_policy.cc
 0e49d029d5a1a25d971880b9e44d67ac70b31a80   chromium/sandbox/win/src/win_utils.cc
 0e49d029d5a1a25d971880b9e44d67ac70b31a80   chromium/sandbox/win/src/win_utils.h
+3181ba39ee787e1b40f4aea4be23f4f666ad0945   chromium/base/win/windows_version.cc
+3181ba39ee787e1b40f4aea4be23f4f666ad0945   chromium/base/win/windows_version.h