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

Unified Diff: chrome/browser/chrome_browser_field_trials.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: chrome/browser/chrome_browser_field_trials.cc
diff --git a/chrome/browser/chrome_browser_field_trials.cc b/chrome/browser/chrome_browser_field_trials.cc
index 904a12136d5559d03cf9ad480fe829a8b15ea30f..c2da21216a6eff793faddd0ffe487e8f3c2028f2 100644
--- a/chrome/browser/chrome_browser_field_trials.cc
+++ b/chrome/browser/chrome_browser_field_trials.cc
@@ -24,6 +24,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "components/metrics/metrics_pref_names.h"
+#include "components/metrics/persistent_system_profile.h"
#include "components/variations/variations_associated_data.h"
#if defined(OS_ANDROID)
@@ -120,6 +121,10 @@ void InstantiatePersistentHistograms() {
if (!allocator)
return;
+ // Store a copy of the system profile in this allocator.
+ metrics::GlobalPersistentSystemProfile::GetInstance()
+ ->RegisterPersistentAllocator(allocator->memory_allocator());
+
// Create tracking histograms for the allocator and record storage file.
allocator->CreateTrackingHistograms(
ChromeMetricsServiceClient::kBrowserMetricsName);

Powered by Google App Engine
This is Rietveld 408576698