| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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/sys_info.h" | 5 #include "base/sys_info.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 | 102 |
| 103 // static | 103 // static |
| 104 size_t SysInfo::VMAllocationGranularity() { | 104 size_t SysInfo::VMAllocationGranularity() { |
| 105 SYSTEM_INFO sysinfo; | 105 SYSTEM_INFO sysinfo; |
| 106 GetSystemInfo(&sysinfo); | 106 GetSystemInfo(&sysinfo); |
| 107 | 107 |
| 108 return sysinfo.dwAllocationGranularity; | 108 return sysinfo.dwAllocationGranularity; |
| 109 } | 109 } |
| 110 | 110 |
| 111 // static |
| 112 void OperatingSystemVersionNumbers(int32 *major_version, |
| 113 int32 *minor_version, |
| 114 int32 *bugfix_version) { |
| 115 OSVERSIONINFO info = {0}; |
| 116 info.dwOSVersionInfoSize = sizeof(info); |
| 117 GetVersionEx(&info); |
| 118 *major_version = info.dwMajorVersion; |
| 119 *minor_version = info.dwMinorVersion; |
| 120 *bugfix_version = 0; |
| 121 } |
| 122 |
| 111 } // namespace base | 123 } // namespace base |
| OLD | NEW |