summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorjeremy <jeremy@chromium.org>2014-11-06 10:47:10 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-06 18:47:23 +0000
commitba4eca9bf6691e4ed55eee55a0bcac1a932b7688 (patch)
treef0d265c69ef707893ca877a8642176d58cb04041 /components
parent5fc1223ad2f83c6ee3b285a73f86f927f3e348e4 (diff)
downloadchromium_src-ba4eca9bf6691e4ed55eee55a0bcac1a932b7688.zip
chromium_src-ba4eca9bf6691e4ed55eee55a0bcac1a932b7688.tar.gz
chromium_src-ba4eca9bf6691e4ed55eee55a0bcac1a932b7688.tar.bz2
UMA: Set Hardware model class on Mac.
Record the hardware model on Mac e.g. MacPro1,1 . BUG=429487 Review URL: https://codereview.chromium.org/699173002 Cr-Commit-Position: refs/heads/master@{#303054}
Diffstat (limited to 'components')
-rw-r--r--components/metrics/metrics_log.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/metrics/metrics_log.cc b/components/metrics/metrics_log.cc
index 8764a73..2ea6f89 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());