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

Unified Diff: components/variations/variations_seed_processor.cc

Issue 2463223002: Store field trial parameters in shared memory (Closed)
Patch Set: check that cache has been cleared in test Created 4 years 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 | « base/metrics/field_trial_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/variations/variations_seed_processor.cc
diff --git a/components/variations/variations_seed_processor.cc b/components/variations/variations_seed_processor.cc
index 50c5cdc7dc39219208130d93a1177c97461ff41d..8c67a51cdfef959671f298f323620af48e24ee02 100644
--- a/components/variations/variations_seed_processor.cc
+++ b/components/variations/variations_seed_processor.cc
@@ -86,6 +86,9 @@ void ForceExperimentState(
RegisterExperimentParams(study, experiment);
RegisterVariationIds(experiment, study.name());
if (study.activation_type() == Study_ActivationType_ACTIVATION_AUTO) {
+ // This call must happen after all params have been registered for the
+ // trial. Otherwise, since we look up params by trial and group name, the
+ // params won't be registered under the correct key.
trial->group();
// UI Strings can only be overridden from ACTIVATION_AUTO experiments.
ApplyUIStringOverrides(experiment, override_callback);
@@ -310,6 +313,9 @@ void VariationsSeedProcessor::CreateTrialFromStudy(
RegisterFeatureOverrides(processed_study, trial.get(), feature_list);
if (study.activation_type() == Study_ActivationType_ACTIVATION_AUTO) {
+ // This call must happen after all params have been registered for the
+ // trial. Otherwise, since we look up params by trial and group name, the
+ // params won't be registered under the correct key.
const std::string& group_name = trial->group_name();
// Don't try to apply overrides if none of the experiments in this study had
« no previous file with comments | « base/metrics/field_trial_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698