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

Unified Diff: components/variations/variations_seed_processor.h

Issue 1984003002: Use low entropy for studies that send experiment IDs to Google properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/variations/variations_seed_processor.h
diff --git a/components/variations/variations_seed_processor.h b/components/variations/variations_seed_processor.h
index a7ddd5c3118ac04daf641ac576cf782a311bea4d..23220d780b091dc44c4c55e9585380bddc5c5347 100644
--- a/components/variations/variations_seed_processor.h
+++ b/components/variations/variations_seed_processor.h
@@ -40,17 +40,21 @@ class VariationsSeedProcessor {
// Creates field trials from the specified variations |seed|, based on the
// specified configuration, as specified in the parameters.
- void CreateTrialsFromSeed(const VariationsSeed& seed,
- const std::string& locale,
- const base::Time& reference_date,
- const base::Version& version,
- Study_Channel channel,
- Study_FormFactor form_factor,
- const std::string& hardware_class,
- const std::string& session_consistency_country,
- const std::string& permanent_consistency_country,
- const UIStringOverrideCallback& override_callback,
- base::FeatureList* feature_list);
+ void CreateTrialsFromSeed(
+ const VariationsSeed& seed,
+ const std::string& locale,
+ const base::Time& reference_date,
+ const base::Version& version,
+ Study_Channel channel,
+ Study_FormFactor form_factor,
+ const std::string& hardware_class,
+ const std::string& session_consistency_country,
+ const std::string& permanent_consistency_country,
+ const UIStringOverrideCallback& override_callback,
+ base::FeatureList* feature_list,
Alexei Svitkine (slow) 2016/05/18 15:03:30 Nit: This non-const param should be last.
jwd 2016/05/18 18:31:41 Done.
+ const base::FieldTrial::EntropyProvider* low_entropy_provider);
+
+ static bool ShouldStudyUseLowEntropy(const Study& study);
Alexei Svitkine (slow) 2016/05/18 15:03:31 Nit: Add a comment.
jwd 2016/05/18 18:31:41 Done.
private:
friend class VariationsSeedProcessorTest;
@@ -77,10 +81,14 @@ class VariationsSeedProcessor {
bool AllowVariationIdWithForcingFlag(const Study& study);
// Creates and registers a field trial from the |processed_study| data.
- // Disables the trial if |processed_study.is_expired| is true.
- void CreateTrialFromStudy(const ProcessedStudy& processed_study,
- const UIStringOverrideCallback& override_callback,
- base::FeatureList* feature_list);
+ // Disables the trial if |processed_study.is_expired| is true. Uses
+ // |low_entropy_provider| if ShouldStudyUseLowEntropy returns true for the
+ // study.
Alexei Svitkine (slow) 2016/05/18 15:03:31 Nit: Add the same comment to CreateTrialsFromSeed(
jwd 2016/05/18 18:31:41 Done.
+ void CreateTrialFromStudy(
+ const ProcessedStudy& processed_study,
+ const UIStringOverrideCallback& override_callback,
+ const base::FieldTrial::EntropyProvider* low_entropy_provider,
+ base::FeatureList* feature_list);
DISALLOW_COPY_AND_ASSIGN(VariationsSeedProcessor);
};

Powered by Google App Engine
This is Rietveld 408576698