| 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_SYS_INFO_H_ | 5 #ifndef BASE_SYS_INFO_H_ |
| 6 #define BASE_SYS_INFO_H_ | 6 #define BASE_SYS_INFO_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // Return the number of megabytes of physical memory on the current machine. | 29 // Return the number of megabytes of physical memory on the current machine. |
| 30 static int AmountOfPhysicalMemoryMB() { | 30 static int AmountOfPhysicalMemoryMB() { |
| 31 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024); | 31 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024); |
| 32 } | 32 } |
| 33 | 33 |
| 34 // Return the available disk space in bytes on the volume containing |path|, | 34 // Return the available disk space in bytes on the volume containing |path|, |
| 35 // or -1 on failure. | 35 // or -1 on failure. |
| 36 static int64 AmountOfFreeDiskSpace(const FilePath& path); | 36 static int64 AmountOfFreeDiskSpace(const FilePath& path); |
| 37 | 37 |
| 38 // Return the maximum length of path component on the volume containing |
| 39 // |path| in the number of FilePath::CharType, or -1 on failure. |
| 40 static int GetMaximumPathComponentLength(const FilePath& path); |
| 41 |
| 38 // Returns system uptime in milliseconds. | 42 // Returns system uptime in milliseconds. |
| 39 static int64 Uptime(); | 43 static int64 Uptime(); |
| 40 | 44 |
| 41 // Returns the name of the host operating system. | 45 // Returns the name of the host operating system. |
| 42 static std::string OperatingSystemName(); | 46 static std::string OperatingSystemName(); |
| 43 | 47 |
| 44 // Returns the version of the host operating system. | 48 // Returns the version of the host operating system. |
| 45 static std::string OperatingSystemVersion(); | 49 static std::string OperatingSystemVersion(); |
| 46 | 50 |
| 47 // Retrieves detailed numeric values for the OS version. | 51 // Retrieves detailed numeric values for the OS version. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Returns the device's name. | 107 // Returns the device's name. |
| 104 static std::string GetDeviceName(); | 108 static std::string GetDeviceName(); |
| 105 | 109 |
| 106 static int DalvikHeapSizeMB(); | 110 static int DalvikHeapSizeMB(); |
| 107 #endif // defined(OS_ANDROID) | 111 #endif // defined(OS_ANDROID) |
| 108 }; | 112 }; |
| 109 | 113 |
| 110 } // namespace base | 114 } // namespace base |
| 111 | 115 |
| 112 #endif // BASE_SYS_INFO_H_ | 116 #endif // BASE_SYS_INFO_H_ |
| OLD | NEW |