OLD | NEW |
1 // Copyright (c) 2010 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_SYS_INFO_H_ | 5 #ifndef BASE_SYS_INFO_H_ |
6 #define BASE_SYS_INFO_H_ | 6 #define BASE_SYS_INFO_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include "base/base_api.h" |
9 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
10 | 11 |
11 #include <string> | 12 #include <string> |
12 | 13 |
13 class FilePath; | 14 class FilePath; |
14 | 15 |
15 namespace base { | 16 namespace base { |
16 | 17 |
17 class SysInfo { | 18 class BASE_API SysInfo { |
18 public: | 19 public: |
19 // Return the number of logical processors/cores on the current machine. | 20 // Return the number of logical processors/cores on the current machine. |
20 static int NumberOfProcessors(); | 21 static int NumberOfProcessors(); |
21 | 22 |
22 // Return the number of bytes of physical memory on the current machine. | 23 // Return the number of bytes of physical memory on the current machine. |
23 static int64 AmountOfPhysicalMemory(); | 24 static int64 AmountOfPhysicalMemory(); |
24 | 25 |
25 // Return the number of megabytes of physical memory on the current machine. | 26 // Return the number of megabytes of physical memory on the current machine. |
26 static int AmountOfPhysicalMemoryMB() { | 27 static int AmountOfPhysicalMemoryMB() { |
27 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024); | 28 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 static void ParseLsbRelease(const std::string& lsb_release, | 75 static void ParseLsbRelease(const std::string& lsb_release, |
75 int32 *major_version, | 76 int32 *major_version, |
76 int32 *minor_version, | 77 int32 *minor_version, |
77 int32 *bugfix_version); | 78 int32 *bugfix_version); |
78 #endif | 79 #endif |
79 }; | 80 }; |
80 | 81 |
81 } // namespace base | 82 } // namespace base |
82 | 83 |
83 #endif // BASE_SYS_INFO_H_ | 84 #endif // BASE_SYS_INFO_H_ |
OLD | NEW |