| 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> |
| 9 |
| 8 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| 9 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 10 | 12 |
| 11 typedef void* HANDLE; | 13 typedef void* HANDLE; |
| 12 | 14 |
| 13 namespace base { | 15 namespace base { |
| 14 namespace win { | 16 namespace win { |
| 15 | 17 |
| 16 // The running version of Windows. This is declared outside OSInfo for | 18 // The running version of Windows. This is declared outside OSInfo for |
| 17 // syntactic sugar reasons; see the declaration of GetVersion() below. | 19 // syntactic sugar reasons; see the declaration of GetVersion() below. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 static OSInfo* GetInstance(); | 71 static OSInfo* GetInstance(); |
| 70 | 72 |
| 71 Version version() const { return version_; } | 73 Version version() const { return version_; } |
| 72 // The next two functions return arrays of values, [major, minor(, build)]. | 74 // The next two functions return arrays of values, [major, minor(, build)]. |
| 73 VersionNumber version_number() const { return version_number_; } | 75 VersionNumber version_number() const { return version_number_; } |
| 74 ServicePack service_pack() const { return service_pack_; } | 76 ServicePack service_pack() const { return service_pack_; } |
| 75 WindowsArchitecture architecture() const { return architecture_; } | 77 WindowsArchitecture architecture() const { return architecture_; } |
| 76 int processors() const { return processors_; } | 78 int processors() const { return processors_; } |
| 77 size_t allocation_granularity() const { return allocation_granularity_; } | 79 size_t allocation_granularity() const { return allocation_granularity_; } |
| 78 WOW64Status wow64_status() const { return wow64_status_; } | 80 WOW64Status wow64_status() const { return wow64_status_; } |
| 81 std::string processor_model_name(); |
| 79 | 82 |
| 80 // Like wow64_status(), but for the supplied handle instead of the current | 83 // Like wow64_status(), but for the supplied handle instead of the current |
| 81 // process. This doesn't touch member state, so you can bypass the singleton. | 84 // process. This doesn't touch member state, so you can bypass the singleton. |
| 82 static WOW64Status GetWOW64StatusForProcess(HANDLE process_handle); | 85 static WOW64Status GetWOW64StatusForProcess(HANDLE process_handle); |
| 83 | 86 |
| 84 private: | 87 private: |
| 85 OSInfo(); | 88 OSInfo(); |
| 86 ~OSInfo(); | 89 ~OSInfo(); |
| 87 | 90 |
| 88 Version version_; | 91 Version version_; |
| 89 VersionNumber version_number_; | 92 VersionNumber version_number_; |
| 90 ServicePack service_pack_; | 93 ServicePack service_pack_; |
| 91 WindowsArchitecture architecture_; | 94 WindowsArchitecture architecture_; |
| 92 int processors_; | 95 int processors_; |
| 93 size_t allocation_granularity_; | 96 size_t allocation_granularity_; |
| 94 WOW64Status wow64_status_; | 97 WOW64Status wow64_status_; |
| 98 std::string processor_model_name_; |
| 95 | 99 |
| 96 DISALLOW_COPY_AND_ASSIGN(OSInfo); | 100 DISALLOW_COPY_AND_ASSIGN(OSInfo); |
| 97 }; | 101 }; |
| 98 | 102 |
| 99 // Because this is by far the most commonly-requested value from the above | 103 // Because this is by far the most commonly-requested value from the above |
| 100 // singleton, we add a global-scope accessor here as syntactic sugar. | 104 // singleton, we add a global-scope accessor here as syntactic sugar. |
| 101 BASE_EXPORT Version GetVersion(); | 105 BASE_EXPORT Version GetVersion(); |
| 102 | 106 |
| 103 } // namespace win | 107 } // namespace win |
| 104 } // namespace base | 108 } // namespace base |
| 105 | 109 |
| 106 #endif // BASE_WIN_WINDOWS_VERSION_H_ | 110 #endif // BASE_WIN_WINDOWS_VERSION_H_ |
| OLD | NEW |