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

Side by Side Diff: base/sys_info.h

Issue 1234543003: Report Android Build.MODEL in SystemProfileProto hardware_class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo, use GetDeviceName(). Created 5 years, 5 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') | no next file with comments »
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 an empty 54 // Returns a descriptive string for the current machine model or an empty
55 // string if machime model is unknown or an error occured. 55 // string if the machine model is unknown or an error occured.
56 // e.g. MacPro1,1 on Mac. 56 // e.g. MacPro1,1 on Mac.
jdduke (slow) 2015/07/14 15:04:31 another example for Android might be nice.
tdresser 2015/07/14 18:42:40 Done.
57 // Only implemented on OS X, will return an empty string on other platforms. 57 // Only implemented on OS X and Android, will return an empty string on other
58 // platforms.
58 static std::string HardwareModelName(); 59 static std::string HardwareModelName();
59 60
60 // Returns the name of the host operating system. 61 // Returns the name of the host operating system.
61 static std::string OperatingSystemName(); 62 static std::string OperatingSystemName();
62 63
63 // Returns the version of the host operating system. 64 // Returns the version of the host operating system.
64 static std::string OperatingSystemVersion(); 65 static std::string OperatingSystemVersion();
65 66
66 // Retrieves detailed numeric values for the OS version. 67 // Retrieves detailed numeric values for the OS version.
67 // TODO(port): Implement a Linux version of this method and enable the 68 // TODO(port): Implement a Linux version of this method and enable the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 #endif // defined(OS_CHROMEOS) 124 #endif // defined(OS_CHROMEOS)
124 125
125 #if defined(OS_ANDROID) 126 #if defined(OS_ANDROID)
126 // Returns the Android build's codename. 127 // Returns the Android build's codename.
127 static std::string GetAndroidBuildCodename(); 128 static std::string GetAndroidBuildCodename();
128 129
129 // Returns the Android build ID. 130 // Returns the Android build ID.
130 static std::string GetAndroidBuildID(); 131 static std::string GetAndroidBuildID();
131 132
132 // Returns the device's name. 133 // Returns the device's name.
133 static std::string GetDeviceName(); 134 static std::string GetDeviceName();
jdduke (slow) 2015/07/14 15:04:31 What about removing this and updating the callsite
tdresser 2015/07/14 18:42:39 Done.
gone 2015/07/14 18:44:31 Don't know... I'd be worried that the user agent s
134 135
135 static int DalvikHeapSizeMB(); 136 static int DalvikHeapSizeMB();
136 static int DalvikHeapGrowthLimitMB(); 137 static int DalvikHeapGrowthLimitMB();
137 #endif // defined(OS_ANDROID) 138 #endif // defined(OS_ANDROID)
138 139
139 // Returns true if this is a low-end device. 140 // Returns true if this is a low-end device.
140 // Low-end device refers to devices having less than 512M memory in the 141 // Low-end device refers to devices having less than 512M memory in the
141 // current implementation. 142 // current implementation.
142 static bool IsLowEndDevice(); 143 static bool IsLowEndDevice();
143 }; 144 };
144 145
145 } // namespace base 146 } // namespace base
146 147
147 #endif // BASE_SYS_INFO_H_ 148 #endif // BASE_SYS_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | base/sys_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698