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

Side by Side Diff: base/sys_info_android.cc

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
« base/sys_info.h ('K') | « base/sys_info.cc ('k') | no next file » | 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 #include "base/sys_info.h" 5 #include "base/sys_info.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <sys/system_properties.h> 8 #include <sys/system_properties.h>
9 9
10 #include "base/android/sys_utils.h" 10 #include "base/android/sys_utils.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 __system_property_get("ro.build.id", os_build_id_str); 170 __system_property_get("ro.build.id", os_build_id_str);
171 return std::string(os_build_id_str); 171 return std::string(os_build_id_str);
172 } 172 }
173 173
174 std::string SysInfo::GetDeviceName() { 174 std::string SysInfo::GetDeviceName() {
175 char device_model_str[PROP_VALUE_MAX]; 175 char device_model_str[PROP_VALUE_MAX];
176 __system_property_get("ro.product.model", device_model_str); 176 __system_property_get("ro.product.model", device_model_str);
177 return std::string(device_model_str); 177 return std::string(device_model_str);
178 } 178 }
179 179
180 std::string SysInfo::HardwareModelName() {
181 return GetDeviceName();
182 }
183
180 std::string SysInfo::OperatingSystemVersion() { 184 std::string SysInfo::OperatingSystemVersion() {
181 int32 major, minor, bugfix; 185 int32 major, minor, bugfix;
182 OperatingSystemVersionNumbers(&major, &minor, &bugfix); 186 OperatingSystemVersionNumbers(&major, &minor, &bugfix);
183 return StringPrintf("%d.%d.%d", major, minor, bugfix); 187 return StringPrintf("%d.%d.%d", major, minor, bugfix);
184 } 188 }
185 189
186 void SysInfo::OperatingSystemVersionNumbers(int32* major_version, 190 void SysInfo::OperatingSystemVersionNumbers(int32* major_version,
187 int32* minor_version, 191 int32* minor_version,
188 int32* bugfix_version) { 192 int32* bugfix_version) {
189 // Read the version number string out from the properties. 193 // Read the version number string out from the properties.
(...skipping 19 matching lines...) Expand all
209 base::internal::LazySysInfoValue<bool, 213 base::internal::LazySysInfoValue<bool,
210 android::SysUtils::IsLowEndDeviceFromJni> >::Leaky 214 android::SysUtils::IsLowEndDeviceFromJni> >::Leaky
211 g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER; 215 g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER;
212 216
213 bool SysInfo::IsLowEndDevice() { 217 bool SysInfo::IsLowEndDevice() {
214 return g_lazy_low_end_device.Get().value(); 218 return g_lazy_low_end_device.Get().value();
215 } 219 }
216 220
217 221
218 } // namespace base 222 } // namespace base
OLDNEW
« base/sys_info.h ('K') | « base/sys_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698