| 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 <map> | 8 #include <map> | 
| 9 #include <string> | 9 #include <string> | 
| 10 | 10 | 
| (...skipping 30 matching lines...) Expand all  Loading... | 
| 41   // Return the number of megabytes of available virtual memory, or zero if it | 41   // Return the number of megabytes of available virtual memory, or zero if it | 
| 42   // is unlimited. | 42   // is unlimited. | 
| 43   static int AmountOfVirtualMemoryMB() { | 43   static int AmountOfVirtualMemoryMB() { | 
| 44     return static_cast<int>(AmountOfVirtualMemory() / 1024 / 1024); | 44     return static_cast<int>(AmountOfVirtualMemory() / 1024 / 1024); | 
| 45   } | 45   } | 
| 46 | 46 | 
| 47   // Return the available disk space in bytes on the volume containing |path|, | 47   // Return the available disk space in bytes on the volume containing |path|, | 
| 48   // or -1 on failure. | 48   // or -1 on failure. | 
| 49   static int64 AmountOfFreeDiskSpace(const FilePath& path); | 49   static int64 AmountOfFreeDiskSpace(const FilePath& path); | 
| 50 | 50 | 
|  | 51   // Determine whether the device that services |path| has a seek penalty. | 
|  | 52   // Returns false if it couldn't be determined (e.g., |path| doesn't exist). | 
|  | 53   static bool HasSeekPenalty(const FilePath& path, bool* has_seek_penalty); | 
|  | 54 | 
| 51   // Returns system uptime in milliseconds. | 55   // Returns system uptime in milliseconds. | 
| 52   static int64 Uptime(); | 56   static int64 Uptime(); | 
| 53 | 57 | 
| 54   // Returns a descriptive string for the current machine model or an empty | 58   // Returns a descriptive string for the current machine model or an empty | 
| 55   // string if machime model is unknown or an error occured. | 59   // string if machime model is unknown or an error occured. | 
| 56   // e.g. MacPro1,1 on Mac. | 60   // e.g. MacPro1,1 on Mac. | 
| 57   // Only implemented on OS X, will return an empty string on other platforms. | 61   // Only implemented on OS X, will return an empty string on other platforms. | 
| 58   static std::string HardwareModelName(); | 62   static std::string HardwareModelName(); | 
| 59 | 63 | 
| 60   // Returns the name of the host operating system. | 64   // Returns the name of the host operating system. | 
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 138 | 142 | 
| 139   // Returns true if this is a low-end device. | 143   // Returns true if this is a low-end device. | 
| 140   // Low-end device refers to devices having less than 512M memory in the | 144   // Low-end device refers to devices having less than 512M memory in the | 
| 141   // current implementation. | 145   // current implementation. | 
| 142   static bool IsLowEndDevice(); | 146   static bool IsLowEndDevice(); | 
| 143 }; | 147 }; | 
| 144 | 148 | 
| 145 }  // namespace base | 149 }  // namespace base | 
| 146 | 150 | 
| 147 #endif  // BASE_SYS_INFO_H_ | 151 #endif  // BASE_SYS_INFO_H_ | 
| OLD | NEW | 
|---|