| OLD | NEW |
| 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 #ifndef BASE_WIN_WINDOWS_VERSION_H_ | 5 #ifndef BASE_WIN_WINDOWS_VERSION_H_ |
| 6 #define BASE_WIN_WINDOWS_VERSION_H_ | 6 #define BASE_WIN_WINDOWS_VERSION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 | 12 |
| 13 typedef void* HANDLE; | 13 typedef void* HANDLE; |
| 14 | 14 |
| 15 namespace base { | 15 namespace base { |
| 16 namespace win { | 16 namespace win { |
| 17 | 17 |
| 18 // The running version of Windows. This is declared outside OSInfo for | 18 // The running version of Windows. This is declared outside OSInfo for |
| 19 // syntactic sugar reasons; see the declaration of GetVersion() below. | 19 // syntactic sugar reasons; see the declaration of GetVersion() below. |
| 20 // NOTE: Keep these in order so callers can do things like | 20 // NOTE: Keep these in order so callers can do things like |
| 21 // "if (base::win::GetVersion() >= base::win::VERSION_VISTA) ...". | 21 // "if (base::win::GetVersion() >= base::win::VERSION_VISTA) ...". |
| 22 enum Version { | 22 enum Version { |
| 23 VERSION_PRE_XP = 0, // Not supported. | 23 VERSION_PRE_XP = 0, // Not supported. |
| 24 VERSION_XP, | 24 VERSION_XP, |
| 25 VERSION_SERVER_2003, // Also includes XP Pro x64 and Server 2003 R2. | 25 VERSION_SERVER_2003, // Also includes XP Pro x64 and Server 2003 R2. |
| 26 VERSION_VISTA, // Also includes Windows Server 2008. | 26 VERSION_VISTA, // Also includes Windows Server 2008. |
| 27 VERSION_WIN7, // Also includes Windows Server 2008 R2. | 27 VERSION_WIN7, // Also includes Windows Server 2008 R2. |
| 28 VERSION_WIN8, // Also includes Windows Server 2012. | 28 VERSION_WIN8, // Also includes Windows Server 2012. |
| 29 VERSION_WIN8_1, // Code named Windows Blue | 29 VERSION_WIN8_1, // Also includes Windows Server 2012 R2. |
| 30 VERSION_WIN10, // Also includes Windows 10 Server. |
| 30 VERSION_WIN_LAST, // Indicates error condition. | 31 VERSION_WIN_LAST, // Indicates error condition. |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 // A rough bucketing of the available types of versions of Windows. This is used | 34 // A rough bucketing of the available types of versions of Windows. This is used |
| 34 // to distinguish enterprise enabled versions from home versions and potentially | 35 // to distinguish enterprise enabled versions from home versions and potentially |
| 35 // server versions. | 36 // server versions. |
| 36 enum VersionType { | 37 enum VersionType { |
| 37 SUITE_HOME, | 38 SUITE_HOME, |
| 38 SUITE_PROFESSIONAL, | 39 SUITE_PROFESSIONAL, |
| 39 SUITE_SERVER, | 40 SUITE_SERVER, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 // Because this is by far the most commonly-requested value from the above | 117 // Because this is by far the most commonly-requested value from the above |
| 117 // singleton, we add a global-scope accessor here as syntactic sugar. | 118 // singleton, we add a global-scope accessor here as syntactic sugar. |
| 118 BASE_EXPORT Version GetVersion(); | 119 BASE_EXPORT Version GetVersion(); |
| 119 | 120 |
| 120 } // namespace win | 121 } // namespace win |
| 121 } // namespace base | 122 } // namespace base |
| 122 | 123 |
| 123 #endif // BASE_WIN_WINDOWS_VERSION_H_ | 124 #endif // BASE_WIN_WINDOWS_VERSION_H_ |
| OLD | NEW |