| 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 <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 return VERSION_WIN8; | 45 return VERSION_WIN8; |
| 46 default: | 46 default: |
| 47 DCHECK_EQ(minor, 3); | 47 DCHECK_EQ(minor, 3); |
| 48 return VERSION_WIN8_1; | 48 return VERSION_WIN8_1; |
| 49 } | 49 } |
| 50 } else if (major == 10) { | 50 } else if (major == 10) { |
| 51 if (build < 10586) { | 51 if (build < 10586) { |
| 52 return VERSION_WIN10; | 52 return VERSION_WIN10; |
| 53 } else if (build < 14393) { | 53 } else if (build < 14393) { |
| 54 return VERSION_WIN10_TH2; | 54 return VERSION_WIN10_TH2; |
| 55 } else if (build < 15063) { |
| 56 return VERSION_WIN10_RS1; |
| 55 } else { | 57 } else { |
| 56 return VERSION_WIN10_R1; | 58 return VERSION_WIN10_RS2; |
| 57 } | 59 } |
| 58 } else if (major > 6) { | 60 } else if (major > 6) { |
| 59 NOTREACHED(); | 61 NOTREACHED(); |
| 60 return VERSION_WIN_LAST; | 62 return VERSION_WIN_LAST; |
| 61 } | 63 } |
| 62 | 64 |
| 63 return VERSION_PRE_XP; | 65 return VERSION_PRE_XP; |
| 64 } | 66 } |
| 65 | 67 |
| 66 // Retrieve a version from kernel32. This is useful because when running in | 68 // Retrieve a version from kernel32. This is useful because when running in |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 return WOW64_UNKNOWN; | 248 return WOW64_UNKNOWN; |
| 247 return is_wow64 ? WOW64_ENABLED : WOW64_DISABLED; | 249 return is_wow64 ? WOW64_ENABLED : WOW64_DISABLED; |
| 248 } | 250 } |
| 249 | 251 |
| 250 Version GetVersion() { | 252 Version GetVersion() { |
| 251 return OSInfo::GetInstance()->version(); | 253 return OSInfo::GetInstance()->version(); |
| 252 } | 254 } |
| 253 | 255 |
| 254 } // namespace win | 256 } // namespace win |
| 255 } // namespace base | 257 } // namespace base |
| OLD | NEW |