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

Side by Side Diff: base/sys_info.h

Issue 999623002: metrics/base: log whether drives have seek penalties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 9 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.cc » ('j') | base/sys_info.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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 30 matching lines...) Expand all
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) or
53 // |has_seek_penalty| is NULL.
rvargas (doing something else) 2015/03/12 22:01:11 The second condition sounds like a DCHECK to me.
Dan Beam 2015/03/13 19:31:31 Done.
54 static bool HasSeekPenalty(const FilePath& path, bool* has_seek_penalty);
55
51 // Returns system uptime in milliseconds. 56 // Returns system uptime in milliseconds.
52 static int64 Uptime(); 57 static int64 Uptime();
53 58
54 // Returns a descriptive string for the current machine model or an empty 59 // Returns a descriptive string for the current machine model or an empty
55 // string if machime model is unknown or an error occured. 60 // string if machime model is unknown or an error occured.
56 // e.g. MacPro1,1 on Mac. 61 // e.g. MacPro1,1 on Mac.
57 // Only implemented on OS X, will return an empty string on other platforms. 62 // Only implemented on OS X, will return an empty string on other platforms.
58 static std::string HardwareModelName(); 63 static std::string HardwareModelName();
59 64
60 // Returns the name of the host operating system. 65 // Returns the name of the host operating system.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 143
139 // Returns true if this is a low-end device. 144 // Returns true if this is a low-end device.
140 // Low-end device refers to devices having less than 512M memory in the 145 // Low-end device refers to devices having less than 512M memory in the
141 // current implementation. 146 // current implementation.
142 static bool IsLowEndDevice(); 147 static bool IsLowEndDevice();
143 }; 148 };
144 149
145 } // namespace base 150 } // namespace base
146 151
147 #endif // BASE_SYS_INFO_H_ 152 #endif // BASE_SYS_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | base/sys_info.cc » ('j') | base/sys_info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698