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

Unified Diff: components/subresource_filter/core/browser/subresource_filter_features_test_support.cc

Issue 2569693002: Introduce performance measurement varitation parameter for SubresourceFilter. (Closed)
Patch Set: Clip measurement rate to [0,1]. 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
Index: components/subresource_filter/core/browser/subresource_filter_features_test_support.cc
diff --git a/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc b/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc
index 5396c019832021cebb54721bcf60fcb1c65828cb..78d2c484a5d7607255c432da06e933165cb68b65 100644
--- a/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc
+++ b/components/subresource_filter/core/browser/subresource_filter_features_test_support.cc
@@ -23,23 +23,22 @@ const char kTestExperimentGroupName[] = "GroupNameShouldNotMatter";
ScopedSubresourceFilterFeatureToggle::ScopedSubresourceFilterFeatureToggle(
base::FeatureList::OverrideState feature_state,
const std::string& maximum_activation_state,
- const std::string& activation_scope)
- : ScopedSubresourceFilterFeatureToggle(feature_state,
- maximum_activation_state,
- activation_scope,
- std::string()) {}
+ const std::string& activation_scope,
+ const std::string& activation_lists,
+ const std::string& performance_measurement_rate)
+ : ScopedSubresourceFilterFeatureToggle(
+ feature_state,
+ {{kActivationStateParameterName, maximum_activation_state},
+ {kActivationScopeParameterName, activation_scope},
+ {kActivationListsParameterName, activation_lists},
+ {kPerformanceMeasurementRateParameterName,
+ performance_measurement_rate}}) {}
ScopedSubresourceFilterFeatureToggle::ScopedSubresourceFilterFeatureToggle(
base::FeatureList::OverrideState feature_state,
- const std::string& maximum_activation_state,
- const std::string& activation_scope,
- const std::string& activation_lists) {
+ std::map<std::string, std::string> variation_params) {
variations::testing::ClearAllVariationParams();
- std::map<std::string, std::string> variation_params;
- variation_params[kActivationStateParameterName] = maximum_activation_state;
- variation_params[kActivationScopeParameterName] = activation_scope;
- variation_params[kActivationListsParameterName] = activation_lists;
EXPECT_TRUE(variations::AssociateVariationParams(
kTestFieldTrialName, kTestExperimentGroupName, variation_params));

Powered by Google App Engine
This is Rietveld 408576698