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/file_version_info_win.h" | 9 #include "base/file_version_info_win.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "base/win/registry.h" | 14 #include "base/win/registry.h" |
15 | 15 |
| 16 #if !defined(__clang__) && _MSC_FULL_VER < 190023918 |
| 17 #error VS 2015 Update 2 or higher is required |
| 18 #endif |
| 19 |
16 namespace { | 20 namespace { |
17 typedef BOOL (WINAPI *GetProductInfoPtr)(DWORD, DWORD, DWORD, DWORD, PDWORD); | 21 typedef BOOL (WINAPI *GetProductInfoPtr)(DWORD, DWORD, DWORD, DWORD, PDWORD); |
18 } // namespace | 22 } // namespace |
19 | 23 |
20 namespace base { | 24 namespace base { |
21 namespace win { | 25 namespace win { |
22 | 26 |
23 namespace { | 27 namespace { |
24 | 28 |
25 // Helper to map a major.minor.x.build version (e.g. 6.1) to a Windows release. | 29 // Helper to map a major.minor.x.build version (e.g. 6.1) to a Windows release. |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 return WOW64_UNKNOWN; | 220 return WOW64_UNKNOWN; |
217 return is_wow64 ? WOW64_ENABLED : WOW64_DISABLED; | 221 return is_wow64 ? WOW64_ENABLED : WOW64_DISABLED; |
218 } | 222 } |
219 | 223 |
220 Version GetVersion() { | 224 Version GetVersion() { |
221 return OSInfo::GetInstance()->version(); | 225 return OSInfo::GetInstance()->version(); |
222 } | 226 } |
223 | 227 |
224 } // namespace win | 228 } // namespace win |
225 } // namespace base | 229 } // namespace base |
OLD | NEW |