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