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

Unified Diff: components/metrics/metrics_log.cc

Issue 2907543003: Support persistent system profiles. (Closed)
Patch Set: addressed review comments by asvitkine Created 3 years, 7 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: components/metrics/metrics_log.cc
diff --git a/components/metrics/metrics_log.cc b/components/metrics/metrics_log.cc
index ac35ce396a32a8f06f1a7a7d913953cbb161e290..6b2c8bf9f797693e61bbe1664d242c237d0fba07 100644
--- a/components/metrics/metrics_log.cc
+++ b/components/metrics/metrics_log.cc
@@ -22,6 +22,7 @@
#include "components/metrics/metrics_pref_names.h"
#include "components/metrics/metrics_provider.h"
#include "components/metrics/metrics_service_client.h"
+#include "components/metrics/persistent_system_profile.h"
#include "components/metrics/proto/histogram_event.pb.h"
#include "components/metrics/proto/system_profile.pb.h"
#include "components/metrics/proto/user_action_event.pb.h"
@@ -302,6 +303,9 @@ std::string MetricsLog::RecordEnvironment(
for (size_t i = 0; i < metrics_providers.size(); ++i)
metrics_providers[i]->ProvideSystemProfileMetrics(system_profile);
+ GlobalPersistentSystemProfile::GetInstance()->SetSystemProfile(
+ *system_profile);
Alexei Svitkine (slow) 2017/05/29 19:48:32 This causes the system profile to be converted fro
bcwhite 2017/05/29 20:56:35 Turns out that SerializeAndRecordEnvironment retur
+
EnvironmentRecorder recorder(local_state_);
return recorder.SerializeAndRecordEnvironmentToPrefs(*system_profile);
}

Powered by Google App Engine
This is Rietveld 408576698