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

Side by Side Diff: base/win/windows_version.cc

Issue 1626623003: [Win10 sandbox mitigations] Four new Win10 mitigations added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review changes, part 4. "Getting close." Created 4 years, 10 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 unified diff | Download patch
OLDNEW
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
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_TH2;
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698