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

Unified Diff: components/variations/variations_seed_processor.h

Issue 71753004: Allow variation id with forcing flag for special setup & unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years, 1 month 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 | « no previous file | components/variations/variations_seed_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/variations/variations_seed_processor.h
diff --git a/components/variations/variations_seed_processor.h b/components/variations/variations_seed_processor.h
index d714943b7008e89386339bc3045e8d3e96ea421d..dbf8cd2bfb3ee978f8e42c724a1718a7b0a4e304 100644
--- a/components/variations/variations_seed_processor.h
+++ b/components/variations/variations_seed_processor.h
@@ -36,6 +36,10 @@ class VariationsSeedProcessor {
Study_FormFactor form_factor);
private:
+ FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest,
+ AllowForceGroupAndVariationId);
+ FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest,
+ AllowVariationIdWithForcingFlag);
FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest, CheckStudyChannel);
FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest, CheckStudyFormFactor);
FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest, CheckStudyLocale);
@@ -44,6 +48,8 @@ class VariationsSeedProcessor {
FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest, CheckStudyVersion);
FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest,
FilterAndValidateStudies);
+ FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest,
+ ForbidForceGroupWithVariationId);
FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest, ForceGroupWithFlag1);
FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest, ForceGroupWithFlag2);
FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest,
@@ -56,6 +62,11 @@ class VariationsSeedProcessor {
FRIEND_TEST_ALL_PREFIXES(VariationsSeedProcessorTest,
VariationParamsWithForcingFlag);
+ // Check if the |study| is only associated with platform Android/iOS and
+ // channel dev/canary. If so, forcing flag and variation id can both be set.
+ // (Otherwise, forcing_flag and variation_id are mutually exclusive.)
+ bool AllowVariationIdWithForcingFlag(const Study& study);
+
// Filters the list of studies in |seed| and validates and pre-processes them,
// adding any kept studies to |filtered_studies| list. Ensures that the
// resulting list will not have more than one study with the same name.
« no previous file with comments | « no previous file | components/variations/variations_seed_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698