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