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

Unified Diff: components/metrics/metrics_log.cc

Issue 699173002: UMA: Set Hardware model class on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile on ios 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/sys_info_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_log.cc
diff --git a/components/metrics/metrics_log.cc b/components/metrics/metrics_log.cc
index 8764a739fcd6af29cff51e3f6f6022fd16bcbe2b..2ea6f89eab4bdf7bd419d566910725a4fafbf958 100644
--- a/components/metrics/metrics_log.cc
+++ b/components/metrics/metrics_log.cc
@@ -351,8 +351,9 @@ void MetricsLog::RecordEnvironment(
SystemProfileProto::Hardware* hardware = system_profile->mutable_hardware();
- // By default, the hardware class is empty (i.e., unknown).
- hardware->set_hardware_class(std::string());
+ // HardwareModelName() will return an empty string on platforms where it's
+ // not implemented or if an error occured.
+ hardware->set_hardware_class(base::SysInfo::HardwareModelName());
hardware->set_cpu_architecture(base::SysInfo::OperatingSystemArchitecture());
hardware->set_system_ram_mb(base::SysInfo::AmountOfPhysicalMemoryMB());
« no previous file with comments | « base/sys_info_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698