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

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

Issue 2950173003: Support add-on 'field trial' records. (Closed)
Patch Set: Created 3 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/field_trial_synchronizer.cc
diff --git a/chrome/browser/metrics/field_trial_synchronizer.cc b/chrome/browser/metrics/field_trial_synchronizer.cc
index 3b3ffef02532328bcd72146c7b46b8b400c009f5..34be4b5bcaa9bb548f87ceb02044e47663e0cd28 100644
--- a/chrome/browser/metrics/field_trial_synchronizer.cc
+++ b/chrome/browser/metrics/field_trial_synchronizer.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/threading/thread.h"
#include "chrome/common/renderer_configuration.mojom.h"
+#include "components/metrics/persistent_system_profile.h"
#include "components/variations/variations_util.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
@@ -39,6 +40,11 @@ void FieldTrialSynchronizer::NotifyAllRenderers(
// need to be on the UI thread.
DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ // Note this in the persistent profile as it will take a while for a new
+ // "complete" profile to be genereated.
+ metrics::GlobalPersistentSystemProfile::GetInstance()->SetFieldTrial(
+ field_trial_name, group_name);
+
for (content::RenderProcessHost::iterator it(
content::RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
« no previous file with comments | « no previous file | components/metrics/persistent_system_profile.h » ('j') | components/metrics/persistent_system_profile.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698