OLD | NEW |
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 #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/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 | 15 |
16 // static | 16 // static |
17 int SysInfo::NumberOfProcessors() { | 17 int SysInfo::NumberOfProcessors() { |
18 SYSTEM_INFO info; | 18 SYSTEM_INFO info; |
19 GetSystemInfo(&info); | 19 GetSystemInfo(&info); |
20 return static_cast<int>(info.dwNumberOfProcessors); | 20 return static_cast<int>(info.dwNumberOfProcessors); |
21 } | 21 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 int32 *bugfix_version) { | 100 int32 *bugfix_version) { |
101 OSVERSIONINFO info = {0}; | 101 OSVERSIONINFO info = {0}; |
102 info.dwOSVersionInfoSize = sizeof(info); | 102 info.dwOSVersionInfoSize = sizeof(info); |
103 GetVersionEx(&info); | 103 GetVersionEx(&info); |
104 *major_version = info.dwMajorVersion; | 104 *major_version = info.dwMajorVersion; |
105 *minor_version = info.dwMinorVersion; | 105 *minor_version = info.dwMinorVersion; |
106 *bugfix_version = 0; | 106 *bugfix_version = 0; |
107 } | 107 } |
108 | 108 |
109 } // namespace base | 109 } // namespace base |
OLD | NEW |