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

Unified Diff: base/win/windows_version.cc

Issue 10408084: Lump client and server versions of Windows together. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also do away with Server 2003 Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/windows_version.h ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/windows_version.cc
diff --git a/base/win/windows_version.cc b/base/win/windows_version.cc
index 3b280ce7023dfc59ccac1795b553af2038142109..a434bde81cdb5d053f95fe09c5b92a107ab4decf 100644
--- a/base/win/windows_version.cc
+++ b/base/win/windows_version.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -37,21 +37,23 @@ OSInfo::OSInfo()
version_number_.minor = version_info.dwMinorVersion;
version_number_.build = version_info.dwBuildNumber;
if ((version_number_.major == 5) && (version_number_.minor > 0)) {
- version_ = (version_number_.minor == 1) ? VERSION_XP : VERSION_SERVER_2003;
+ // Treat XP Pro x64, Server 2003, Home Server, and Server 2003 R2 as XP.
+ version_ = VERSION_XP;
} else if (version_number_.major == 6) {
- if (version_info.wProductType == VER_NT_WORKSTATION) {
- switch (version_number_.minor) {
- case 0:
- version_ = VERSION_VISTA;
- break;
- case 1:
- version_ = VERSION_WIN7;
- break;
- default: // case 2 appears to be win8.
- version_ = VERSION_WIN8;
- }
- } else {
- version_ = VERSION_SERVER_2008;
+ switch (version_number_.minor) {
+ case 0:
+ // Treat Windows Server 2008 the same as Windows Vista.
+ version_ = VERSION_VISTA;
+ break;
+ case 1:
+ // Treat Windows Server 2008 R2 the same as Windows 7.
+ version_ = VERSION_WIN7;
+ break;
+ default:
+ DCHECK_EQ(version_number_.minor, 2);
+ // Treat Windows Server 2012 the same as Windows 8.
+ version_ = VERSION_WIN8;
+ break;
}
} else if (version_number_.major > 6) {
NOTREACHED();
« no previous file with comments | « base/win/windows_version.h ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698