| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/win/windows_version.h" | 5 #include "base/win/windows_version.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 case 2: | 58 case 2: |
| 59 // Treat Windows Server 2012 the same as Windows 8. | 59 // Treat Windows Server 2012 the same as Windows 8. |
| 60 version_ = VERSION_WIN8; | 60 version_ = VERSION_WIN8; |
| 61 break; | 61 break; |
| 62 default: | 62 default: |
| 63 DCHECK_EQ(version_number_.minor, 3); | 63 DCHECK_EQ(version_number_.minor, 3); |
| 64 version_ = VERSION_WIN8_1; | 64 version_ = VERSION_WIN8_1; |
| 65 break; | 65 break; |
| 66 } | 66 } |
| 67 } else if (version_number_.major == 10) { | 67 } else if (version_number_.major == 10) { |
| 68 version_ = VERSION_WIN10; | 68 if (version_number_.build < 10586) { |
| 69 version_ = VERSION_WIN10; |
| 70 } else { |
| 71 version_ = VERSION_WIN10_10586; |
| 72 } |
| 69 } else if (version_number_.major > 6) { | 73 } else if (version_number_.major > 6) { |
| 70 NOTREACHED(); | 74 NOTREACHED(); |
| 71 version_ = VERSION_WIN_LAST; | 75 version_ = VERSION_WIN_LAST; |
| 72 } | 76 } |
| 73 service_pack_.major = version_info.wServicePackMajor; | 77 service_pack_.major = version_info.wServicePackMajor; |
| 74 service_pack_.minor = version_info.wServicePackMinor; | 78 service_pack_.minor = version_info.wServicePackMinor; |
| 75 | 79 |
| 76 SYSTEM_INFO system_info = {}; | 80 SYSTEM_INFO system_info = {}; |
| 77 ::GetNativeSystemInfo(&system_info); | 81 ::GetNativeSystemInfo(&system_info); |
| 78 switch (system_info.wProcessorArchitecture) { | 82 switch (system_info.wProcessorArchitecture) { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 return WOW64_UNKNOWN; | 173 return WOW64_UNKNOWN; |
| 170 return is_wow64 ? WOW64_ENABLED : WOW64_DISABLED; | 174 return is_wow64 ? WOW64_ENABLED : WOW64_DISABLED; |
| 171 } | 175 } |
| 172 | 176 |
| 173 Version GetVersion() { | 177 Version GetVersion() { |
| 174 return OSInfo::GetInstance()->version(); | 178 return OSInfo::GetInstance()->version(); |
| 175 } | 179 } |
| 176 | 180 |
| 177 } // namespace win | 181 } // namespace win |
| 178 } // namespace base | 182 } // namespace base |
| OLD | NEW |