Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: base/sys_info.h

Issue 2052663003: Move implementation of QuotaManager.getVolumeInfo to base::SysInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add AmountOfTotalDiskSpace() instead of GetDiskSpaceInfo(). Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/sys_info_posix.cc » ('j') | base/sys_info_win.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | base/sys_info_posix.cc » ('j') | base/sys_info_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698