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

Unified Diff: components/ukm/ukm_service.cc

Issue 2657083003: Populate a basic SystemProfileProto in UKM. (Closed)
Patch Set: remove stale TODO Created 3 years, 11 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
« no previous file with comments | « components/metrics/metrics_log_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ukm/ukm_service.cc
diff --git a/components/ukm/ukm_service.cc b/components/ukm/ukm_service.cc
index 2822b7ba310f06f384bc09c4f5deaac604012dd2..42bb7ad38383b0c53f7bc3c836dcd07392131ad2 100644
--- a/components/ukm/ukm_service.cc
+++ b/components/ukm/ukm_service.cc
@@ -15,6 +15,7 @@
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
+#include "components/metrics/metrics_log.h"
#include "components/metrics/metrics_log_uploader.h"
#include "components/metrics/metrics_service_client.h"
#include "components/metrics/proto/ukm/report.pb.h"
@@ -100,6 +101,7 @@ UkmService::UkmService(PrefService* pref_service,
self_ptr_factory_(this) {
DCHECK(pref_service_);
DCHECK(client_);
+ DVLOG(1) << "UkmService::Constructor";
persisted_logs_.DeserializeLogs();
@@ -192,7 +194,6 @@ void UkmService::BuildAndStoreLog() {
DVLOG(1) << "UkmService::BuildAndStoreLog";
Report report;
report.set_client_id(client_id_);
- // TODO(holte): Populate system_profile.
for (const auto& source : sources_) {
Source* proto_source = report.add_sources();
@@ -201,6 +202,9 @@ void UkmService::BuildAndStoreLog() {
UMA_HISTOGRAM_COUNTS_1000("UKM.Sources.SerializedCount", sources_.size());
sources_.clear();
+ metrics::MetricsLog::RecordCoreSystemProfile(client_,
+ report.mutable_system_profile());
+ // TODO(rkaplow): Populate network information.
std::string serialized_log;
report.SerializeToString(&serialized_log);
persisted_logs_.StoreLog(serialized_log);
« no previous file with comments | « components/metrics/metrics_log_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698