Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit be80ca0

Browse files
authored
Add recent Win10 versions for populating correct OsInfo (#96)
1 parent 18721df commit be80ca0

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

rtc_base/win/windows_version.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,18 @@ Version MajorMinorBuildToVersion(int major, int minor, int build) {
203203
return VERSION_WIN10_RS2;
204204
} else if (build < 17134) {
205205
return VERSION_WIN10_RS3;
206-
} else {
206+
} else if (build < 17763) {
207207
return VERSION_WIN10_RS4;
208+
} else if (build < 18362) {
209+
return VERSION_WIN10_RS5;
210+
} else if (build < 18363) {
211+
return VERSION_WIN10_19H1;
212+
} else if (build < 19041) {
213+
return VERSION_WIN10_19H1;
214+
} else if (build < 19042) {
215+
return VERSION_WIN10_20H1;
216+
} else {
217+
return VERSION_WIN10_20H2;
208218
}
209219
} else if (major > 6) {
210220
RTC_NOTREACHED();

rtc_base/win/windows_version.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ enum Version {
4343
VERSION_WIN10_RS2 = 10, // Redstone 2: Version 1703, Build 15063.
4444
VERSION_WIN10_RS3 = 11, // Redstone 3: Version 1709, Build 16299.
4545
VERSION_WIN10_RS4 = 12, // Redstone 4: Version 1803, Build 17134.
46+
VERSION_WIN10_RS5 = 13, // Redstone 5: Version 1809, Build 17763.
47+
VERSION_WIN10_19H1 = 14, // 19H1: Version 1903, Build 18362.
48+
VERSION_WIN10_19H2 = 15, // 19H2: Version 1909, Build 18363.
49+
VERSION_WIN10_20H1 = 16, // 20H1: Version 2004, Build 19041.
50+
VERSION_WIN10_20H2 = 17, // 20H2: Version 20H2, Build 19042.
4651
// On edit, update tools\metrics\histograms\enums.xml "WindowsVersion" and
4752
// "GpuBlacklistFeatureTestResultsWindows2".
4853
VERSION_WIN_LAST, // Indicates error condition.

0 commit comments

Comments
 (0)