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

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: 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
« base/sys_info_unittest.cc ('K') | « 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..4c4a1b0bc03423fdf87c03a19ce60f8975341494 100644
--- a/components/metrics/metrics_log.cc
+++ b/components/metrics/metrics_log.cc
@@ -351,8 +351,12 @@ void MetricsLog::RecordEnvironment(
SystemProfileProto::Hardware* hardware = system_profile->mutable_hardware();
+#if defined(OS_MACOSX)
+ hardware->set_hardware_class(base::SysInfo::HardwareModelName());
+#else
// By default, the hardware class is empty (i.e., unknown).
hardware->set_hardware_class(std::string());
+#endif
Alexei Svitkine (slow) 2014/11/04 16:22:12 FWIW, I'd prefer if we can avoid ifdefs in this co
jeremy 2014/11/05 05:38:06 Done.
hardware->set_cpu_architecture(base::SysInfo::OperatingSystemArchitecture());
hardware->set_system_ram_mb(base::SysInfo::AmountOfPhysicalMemoryMB());
« base/sys_info_unittest.cc ('K') | « base/sys_info_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698