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

Side by Side Diff: base/sys_info.h

Issue 699173002: UMA: Set Hardware model class on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Returns system uptime in milliseconds. 51 // Returns system uptime in milliseconds.
52 static int64 Uptime(); 52 static int64 Uptime();
53 53
54 // Returns a descriptive string for the current machine model or "Unknown"
Alexei Svitkine (slow) 2014/11/04 16:22:12 Maybe better to return an empty string if unknown?
jeremy 2014/11/05 05:38:06 Done.
55 // if an error occured.
Alexei Svitkine (slow) 2014/11/04 16:22:12 Can you provide an example of a return value in th
jeremy 2014/11/05 05:38:06 Example added. I've never seen us mention supporte
Alexei Svitkine (slow) 2014/11/05 15:47:21 My preference would be to add it - as it's helpful
56 static std::string HardwareModelName();
57
54 // Returns the name of the host operating system. 58 // Returns the name of the host operating system.
55 static std::string OperatingSystemName(); 59 static std::string OperatingSystemName();
56 60
57 // Returns the version of the host operating system. 61 // Returns the version of the host operating system.
58 static std::string OperatingSystemVersion(); 62 static std::string OperatingSystemVersion();
59 63
60 // Retrieves detailed numeric values for the OS version. 64 // Retrieves detailed numeric values for the OS version.
61 // TODO(port): Implement a Linux version of this method and enable the 65 // TODO(port): Implement a Linux version of this method and enable the
62 // corresponding unit test. 66 // corresponding unit test.
63 // DON'T USE THIS ON THE MAC OR WINDOWS to determine the current OS release 67 // DON'T USE THIS ON THE MAC OR WINDOWS to determine the current OS release
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 136
133 // Returns true if this is a low-end device. 137 // Returns true if this is a low-end device.
134 // Low-end device refers to devices having less than 512M memory in the 138 // Low-end device refers to devices having less than 512M memory in the
135 // current implementation. 139 // current implementation.
136 static bool IsLowEndDevice(); 140 static bool IsLowEndDevice();
137 }; 141 };
138 142
139 } // namespace base 143 } // namespace base
140 144
141 #endif // BASE_SYS_INFO_H_ 145 #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