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

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: Created 8 years, 7 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') | no next file » | 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..49e970b232d1a731b80310886ae5527892929e89 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.
@@ -39,19 +39,20 @@ OSInfo::OSInfo()
if ((version_number_.major == 5) && (version_number_.minor > 0)) {
version_ = (version_number_.minor == 1) ? VERSION_XP : VERSION_SERVER_2003;
} 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:
+ version_ = (version_info.wProductType == VER_NT_WORKSTATION) ?
+ VERSION_VISTA : VERSION_SERVER_2008;
+ break;
cpu_(ooo_6.6-7.5) 2012/05/23 18:21:08 is server 2008 also vista? I mean, if we are foldi
grt (UTC plus 2) 2012/05/23 21:43:49 Sure, why not. Is it reasonable to lump all of th
+ case 1:
+ // Treat Windows Server 2008 R2 the same as Windows 7.
+ version_ = VERSION_WIN7;
+ break;
+ default: // case 2 appears to be win8.
+ DCHECK_EQ(version_number_.minor, 2);
cpu_(ooo_6.6-7.5) 2012/05/23 18:21:08 I rather have case 2: and a dcheck on the default:
grt (UTC plus 2) 2012/05/23 21:43:49 But then when Windows 9 comes out, version_ will b
+ // 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') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698