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

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

Issue 10736032: Merge 146054 - Bring back VERSION_SERVER_2003 to distinguish Server 2003 and XP Pro x64 from regula… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « base/win/windows_version.h ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10
(...skipping 19 matching lines...) Expand all
30 OSInfo::OSInfo() 30 OSInfo::OSInfo()
31 : version_(VERSION_PRE_XP), 31 : version_(VERSION_PRE_XP),
32 architecture_(OTHER_ARCHITECTURE), 32 architecture_(OTHER_ARCHITECTURE),
33 wow64_status_(GetWOW64StatusForProcess(GetCurrentProcess())) { 33 wow64_status_(GetWOW64StatusForProcess(GetCurrentProcess())) {
34 OSVERSIONINFOEX version_info = { sizeof version_info }; 34 OSVERSIONINFOEX version_info = { sizeof version_info };
35 GetVersionEx(reinterpret_cast<OSVERSIONINFO*>(&version_info)); 35 GetVersionEx(reinterpret_cast<OSVERSIONINFO*>(&version_info));
36 version_number_.major = version_info.dwMajorVersion; 36 version_number_.major = version_info.dwMajorVersion;
37 version_number_.minor = version_info.dwMinorVersion; 37 version_number_.minor = version_info.dwMinorVersion;
38 version_number_.build = version_info.dwBuildNumber; 38 version_number_.build = version_info.dwBuildNumber;
39 if ((version_number_.major == 5) && (version_number_.minor > 0)) { 39 if ((version_number_.major == 5) && (version_number_.minor > 0)) {
40 // Treat XP Pro x64, Server 2003, Home Server, and Server 2003 R2 as XP. 40 // Treat XP Pro x64, Home Server, and Server 2003 R2 as Server 2003.
41 version_ = VERSION_XP; 41 version_ = (version_number_.minor == 1) ? VERSION_XP : VERSION_SERVER_2003;
42 } else if (version_number_.major == 6) { 42 } else if (version_number_.major == 6) {
43 switch (version_number_.minor) { 43 switch (version_number_.minor) {
44 case 0: 44 case 0:
45 // Treat Windows Server 2008 the same as Windows Vista. 45 // Treat Windows Server 2008 the same as Windows Vista.
46 version_ = VERSION_VISTA; 46 version_ = VERSION_VISTA;
47 break; 47 break;
48 case 1: 48 case 1:
49 // Treat Windows Server 2008 R2 the same as Windows 7. 49 // Treat Windows Server 2008 R2 the same as Windows 7.
50 version_ = VERSION_WIN7; 50 version_ = VERSION_WIN7;
51 break; 51 break;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 return WOW64_UNKNOWN; 88 return WOW64_UNKNOWN;
89 return is_wow64 ? WOW64_ENABLED : WOW64_DISABLED; 89 return is_wow64 ? WOW64_ENABLED : WOW64_DISABLED;
90 } 90 }
91 91
92 Version GetVersion() { 92 Version GetVersion() {
93 return OSInfo::GetInstance()->version(); 93 return OSInfo::GetInstance()->version();
94 } 94 }
95 95
96 } // namespace win 96 } // namespace win
97 } // namespace base 97 } // namespace base
OLDNEW
« 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