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

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

Issue 6713107: Make the windows_version.h functions threadsafe by using a singleton. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 typedef void* HANDLE; 9 typedef void* HANDLE;
10 10
11 namespace base { 11 namespace base {
12 namespace win { 12 namespace win {
13 13
14 // NOTE: Keep these in order so callers can do things like 14 // NOTE: Keep these in order so callers can do things like
15 // "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values, 15 // "if (base::win::GetVersion() > base::win::VERSION_2000) ...". It's OK to
16 // though. 16 // change the values, though.
17 enum Version { 17 enum Version {
18 VERSION_PRE_2000 = 0, // Not supported 18 VERSION_PRE_2000 = 0, // Not supported
19 VERSION_2000 = 1, // Not supported 19 VERSION_2000 = 1, // Not supported
20 VERSION_XP = 2, 20 VERSION_XP = 2,
21 VERSION_SERVER_2003 = 3, // Also includes Windows XP Professional x64 edition 21 VERSION_SERVER_2003 = 3, // Also includes Windows XP Professional x64 edition
22 VERSION_VISTA = 4, 22 VERSION_VISTA = 4,
23 VERSION_2008 = 5, 23 VERSION_SERVER_2008 = 5,
24 VERSION_WIN7 = 6, 24 VERSION_WIN7 = 6,
25 }; 25 };
26 26
27 // Returns the running version of Windows. 27 // Returns the running version of Windows.
28 Version GetVersion(); 28 Version GetVersion();
29 29
30 // Returns the major and minor version of the service pack installed. 30 // Returns the major and minor version of the service pack installed.
31 void GetServicePackLevel(int* major, int* minor); 31 void GetServicePackLevel(int* major, int* minor);
32 32
33 enum WindowsArchitecture { 33 enum WindowsArchitecture {
(...skipping 24 matching lines...) Expand all
58 WOW64Status GetWOW64Status(); 58 WOW64Status GetWOW64Status();
59 59
60 // Like GetWOW64Status(), but for the supplied handle instead of the current 60 // Like GetWOW64Status(), but for the supplied handle instead of the current
61 // process. 61 // process.
62 WOW64Status GetWOW64StatusForProcess(HANDLE process_handle); 62 WOW64Status GetWOW64StatusForProcess(HANDLE process_handle);
63 63
64 } // namespace win 64 } // namespace win
65 } // namespace base 65 } // namespace base
66 66
67 #endif // BASE_WIN_WINDOWS_VERSION_H_ 67 #endif // BASE_WIN_WINDOWS_VERSION_H_
OLDNEW
« base/sys_info_win.cc ('K') | « base/sys_info_win.cc ('k') | base/win/windows_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698