Index: chrome/browser/subresource_filter/chrome_subresource_filter_client.h |
diff --git a/chrome/browser/subresource_filter/chrome_subresource_filter_client.h b/chrome/browser/subresource_filter/chrome_subresource_filter_client.h |
index e706577dff44b7d68c78d3330bb3144748e32cd8..4845e32f9f03ad0b0def96feacbcd817cc0f6113 100644 |
--- a/chrome/browser/subresource_filter/chrome_subresource_filter_client.h |
+++ b/chrome/browser/subresource_filter/chrome_subresource_filter_client.h |
@@ -10,6 +10,7 @@ |
#include "components/subresource_filter/content/browser/subresource_filter_client.h" |
class GURL; |
+class SubresourceFilterContentSettingsManager; |
namespace content { |
class WebContents; |
@@ -53,6 +54,16 @@ enum SubresourceFilterAction { |
// flexible. |
kActionContentSettingsWildcardUpdate, |
+ // The UI was suppressed due to "smart" logic which tries not to spam the UI |
+ // on navigations within a certain time period. |
engedy
2017/04/12 14:02:50
nit: How about:
// on navigations on the same ori
Charlie Harrison
2017/04/12 17:53:44
Done.
|
+ kActionUISuppressed, |
+ |
+ // The feature was blocked via content setting manually while smart UI was |
+ // suppressing the UI. Potentially indicates that the smart UI is too |
+ // aggressive if this happens frequently. This is a subset of |
+ // kActionContentSettingsBlcoked. |
engedy
2017/04/12 14:02:50
nit: typo
nit: Clarify what `being a subset` means
Charlie Harrison
2017/04/12 17:53:44
Done.
|
+ kActionContentSettingsBlockedWhileUISuppressed, |
+ |
kActionLastEntry |
}; |
@@ -69,11 +80,20 @@ class ChromeSubresourceFilterClient |
void WhitelistByContentSettings(const GURL& url) override; |
subresource_filter::VerifiedRulesetDealer::Handle* GetRulesetDealer() |
override; |
+ void OnActivationComputed( |
+ const GURL& url, |
+ const subresource_filter::ActivationState& state) override; |
static void LogAction(SubresourceFilterAction action); |
+ bool shown_for_navigation() const { return shown_for_navigation_; } |
+ |
private: |
- ContentSetting GetContentSettingForUrl(const GURL& url); |
+ void OnDidShowUI(const GURL& url); |
+ |
+ // Owned by the profile. |
+ SubresourceFilterContentSettingsManager* settings_manager_; |
+ |
content::WebContents* web_contents_; |
bool shown_for_navigation_; |