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

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

Issue 2186233003: Introduce activation scope logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adressed-comments Created 4 years, 4 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.h
diff --git a/components/subresource_filter/core/browser/subresource_filter_features.h b/components/subresource_filter/core/browser/subresource_filter_features.h
index 612a2d9f1d6956d56b0dd45c5c63d56c826d9ac1..0d972a7f30d25b8da35f6e138645afe6f8a111e6 100644
--- a/components/subresource_filter/core/browser/subresource_filter_features.h
+++ b/components/subresource_filter/core/browser/subresource_filter_features.h
@@ -6,6 +6,7 @@
#define COMPONENTS_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_FEATURES_H_
#include "base/feature_list.h"
+#include "components/subresource_filter/core/common/activation_scope.h"
#include "components/subresource_filter/core/common/activation_state.h"
namespace subresource_filter {
@@ -19,11 +20,22 @@ extern const char kActivationStateDryRun[];
extern const char kActivationStateEnabled[];
extern const char kActivationStateDisabled[];
+extern const char kActivationScopeParameterName[];
+extern const char kActivationScopeAllSites[];
+extern const char kActivationScopeActivationList[];
+extern const char kActivationScopeNoSites[];
+
// Returns the maximum degree to which subresource filtering should be activated
// on any RenderFrame. This will be ActivationState::DISABLED unless the feature
// is enabled and variation parameters prescribe a higher activation state.
ActivationState GetMaximumActivationState();
+// Returns the current activation scope, that is, the subset of page loads where
+// subresource filtering should be activated. The function returns
+// ActivationScope::NO_SITES unless the feature is enabled and variation
+// parameters prescribe a wider activation scope.
+ActivationScope GetCurrentActivationScope();
+
} // namespace subresource_filter
#endif // COMPONENTS_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_FEATURES_H_

Powered by Google App Engine
This is Rietveld 408576698