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

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: Remove 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
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 __system_property_get("ro.build.version.codename", os_version_codename_str); 164 __system_property_get("ro.build.version.codename", os_version_codename_str);
165 return std::string(os_version_codename_str); 165 return std::string(os_version_codename_str);
166 } 166 }
167 167
168 std::string SysInfo::GetAndroidBuildID() { 168 std::string SysInfo::GetAndroidBuildID() {
169 char os_build_id_str[PROP_VALUE_MAX]; 169 char os_build_id_str[PROP_VALUE_MAX];
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::HardwareModelName() {
175 char device_model_str[PROP_VALUE_MAX]; 175 char device_model_str[PROP_VALUE_MAX];
jdduke (slow) 2015/07/14 18:46:48 Nit: Should we move this up above OperatingSystemN
tdresser 2015/07/14 19:02:27 Done.
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::OperatingSystemVersion() { 180 std::string SysInfo::OperatingSystemVersion() {
181 int32 major, minor, bugfix; 181 int32 major, minor, bugfix;
182 OperatingSystemVersionNumbers(&major, &minor, &bugfix); 182 OperatingSystemVersionNumbers(&major, &minor, &bugfix);
183 return StringPrintf("%d.%d.%d", major, minor, bugfix); 183 return StringPrintf("%d.%d.%d", major, minor, bugfix);
184 } 184 }
185 185
(...skipping 23 matching lines...) Expand all
209 base::internal::LazySysInfoValue<bool, 209 base::internal::LazySysInfoValue<bool,
210 android::SysUtils::IsLowEndDeviceFromJni> >::Leaky 210 android::SysUtils::IsLowEndDeviceFromJni> >::Leaky
211 g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER; 211 g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER;
212 212
213 bool SysInfo::IsLowEndDevice() { 213 bool SysInfo::IsLowEndDevice() {
214 return g_lazy_low_end_device.Get().value(); 214 return g_lazy_low_end_device.Get().value();
215 } 215 }
216 216
217 217
218 } // namespace base 218 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698