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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // Return the number of megabytes of available virtual memory, or zero if it | 43 // Return the number of megabytes of available virtual memory, or zero if it |
44 // is unlimited. | 44 // is unlimited. |
45 static int AmountOfVirtualMemoryMB() { | 45 static int AmountOfVirtualMemoryMB() { |
46 return static_cast<int>(AmountOfVirtualMemory() / 1024 / 1024); | 46 return static_cast<int>(AmountOfVirtualMemory() / 1024 / 1024); |
47 } | 47 } |
48 | 48 |
49 // Return the available disk space in bytes on the volume containing |path|, | 49 // Return the available disk space in bytes on the volume containing |path|, |
50 // or -1 on failure. | 50 // or -1 on failure. |
51 static int64_t AmountOfFreeDiskSpace(const FilePath& path); | 51 static int64_t AmountOfFreeDiskSpace(const FilePath& path); |
52 | 52 |
| 53 // Return the total disk space in bytes on the volume containing |path|, or -1 |
| 54 // on failure. |
| 55 static int64_t AmountOfTotalDiskSpace(const FilePath& path); |
| 56 |
53 // Returns system uptime. | 57 // Returns system uptime. |
54 static TimeDelta Uptime(); | 58 static TimeDelta Uptime(); |
55 | 59 |
56 // Returns a descriptive string for the current machine model or an empty | 60 // Returns a descriptive string for the current machine model or an empty |
57 // string if the machine model is unknown or an error occured. | 61 // string if the machine model is unknown or an error occured. |
58 // e.g. "MacPro1,1" on Mac, or "Nexus 5" on Android. Only implemented on OS X, | 62 // e.g. "MacPro1,1" on Mac, or "Nexus 5" on Android. Only implemented on OS X, |
59 // Android, and Chrome OS. This returns an empty string on other platforms. | 63 // Android, and Chrome OS. This returns an empty string on other platforms. |
60 static std::string HardwareModelName(); | 64 static std::string HardwareModelName(); |
61 | 65 |
62 // Returns the name of the host operating system. | 66 // Returns the name of the host operating system. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 141 |
138 // Returns true if this is a low-end device. | 142 // Returns true if this is a low-end device. |
139 // Low-end device refers to devices having less than 512M memory in the | 143 // Low-end device refers to devices having less than 512M memory in the |
140 // current implementation. | 144 // current implementation. |
141 static bool IsLowEndDevice(); | 145 static bool IsLowEndDevice(); |
142 }; | 146 }; |
143 | 147 |
144 } // namespace base | 148 } // namespace base |
145 | 149 |
146 #endif // BASE_SYS_INFO_H_ | 150 #endif // BASE_SYS_INFO_H_ |
OLD | NEW |