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

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

Issue 2667303003: Disable subresource filtering on page reloads. (Closed)
Patch Set: move ui/base to public_deps Created 3 years, 10 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/subresource_filter/core/browser/subresource_filter_features.cc
diff --git a/components/subresource_filter/core/browser/subresource_filter_features.cc b/components/subresource_filter/core/browser/subresource_filter_features.cc
index f14186953a366b1ecda7f97be4391175e948e319..ef13cad4bc40d508a7c94133d6b34e1fb4a50914 100644
--- a/components/subresource_filter/core/browser/subresource_filter_features.cc
+++ b/components/subresource_filter/core/browser/subresource_filter_features.cc
@@ -40,6 +40,8 @@ const char kPerformanceMeasurementRateParameterName[] =
const char kSuppressNotificationsParameterName[] = "suppress_notifications";
+const char kWhitelistSiteOnReloadParameterName[] = "whitelist_site_on_reload";
+
ActivationLevel GetMaximumActivationLevel() {
std::string activation_level = variations::GetVariationParamValueByFeature(
kSafeBrowsingSubresourceFilter, kActivationLevelParameterName);
@@ -101,4 +103,10 @@ std::string GetRulesetFlavor() {
subresource_filter::kRulesetFlavorParameterName);
}
+bool ShouldWhitelistSiteOnReload() {
+ return base::GetFieldTrialParamByFeatureAsBool(
+ kSafeBrowsingSubresourceFilter, kWhitelistSiteOnReloadParameterName,
+ false /* default value */);
+}
+
} // namespace subresource_filter

Powered by Google App Engine
This is Rietveld 408576698