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(); |