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

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

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.h
diff --git a/components/subresource_filter/core/browser/subresource_filter_features_test_support.h b/components/subresource_filter/core/browser/subresource_filter_features_test_support.h
index f2065e9cb40071834a853c552da97fd3c1e49c69..6fe385138548c84ac7d8ccb250c5edf84bae8436 100644
--- a/components/subresource_filter/core/browser/subresource_filter_features_test_support.h
+++ b/components/subresource_filter/core/browser/subresource_filter_features_test_support.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_FEATURES_TEST_SUPPORT_H_
#define COMPONENTS_SUBRESOURCE_FILTER_CORE_BROWSER_SUBRESOURCE_FILTER_FEATURES_TEST_SUPPORT_H_
+#include <map>
#include <string>
#include "base/feature_list.h"
@@ -14,21 +15,21 @@
namespace subresource_filter {
namespace testing {
-// Helper to override the state of the |kSafeBrowsingSubresourceFilter| feature
-// and the maximum activation state during tests. Expects a pre-existing global
-// base::FieldTrialList singleton.
+// Helper to override the state of the |kSafeBrowsingSubresourceFilter| feature,
+// and its variation parameters, e.g., maximum activation state and activation
+// scope. Expects a pre-existing global base::FieldTrialList singleton.
class ScopedSubresourceFilterFeatureToggle {
public:
ScopedSubresourceFilterFeatureToggle(
base::FeatureList::OverrideState feature_state,
const std::string& maximum_activation_state,
- const std::string& activation_scope);
+ const std::string& activation_scope,
+ const std::string& activation_lists = std::string(),
+ const std::string& performance_measurement_rate = std::string());
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);
~ScopedSubresourceFilterFeatureToggle();

Powered by Google App Engine
This is Rietveld 408576698