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

Unified Diff: chrome/browser/metrics/metrics_log.cc

Issue 17770005: Include CPU information in UMA system profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/metrics/metrics_log.cc
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index dbd63b46b79d87a497d281613287772ba33158b6..12d59af0c49a1f8be8e85a63df61aa68a6ae711c 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/bind.h"
+#include "base/cpu.h"
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "base/perftimer.h"
@@ -839,6 +840,16 @@ void MetricsLog::RecordEnvironmentProto(
base::android::BuildInfo::GetInstance()->android_build_fp());
#endif
+ base::CPU cpu_info;
+ SystemProfileProto::Hardware::CPU* cpu = hardware->mutable_cpu();
+ cpu->set_vendor_name(cpu_info.vendor_name());
+ cpu->set_stepping(cpu_info.stepping());
+ cpu->set_model(cpu_info.model());
+ cpu->set_family(cpu_info.family());
+ cpu->set_type(cpu_info.type());
+ cpu->set_extended_model(cpu_info.extended_model());
+ cpu->set_extended_family(cpu_info.extended_family());
+
const gpu::GPUInfo& gpu_info =
GpuDataManager::GetInstance()->GetGPUInfo();
SystemProfileProto::Hardware::Graphics* gpu = hardware->mutable_gpu();
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_log_unittest.cc » ('j') | chrome/common/metrics/proto/system_profile.proto » ('J')

Powered by Google App Engine
This is Rietveld 408576698