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

Unified Diff: chrome/browser/subresource_filter/chrome_subresource_filter_client.h

Issue 2795053002: [subresource_filter] Implement the "Smart" UI on Android (Closed)
Patch Set: minor tweaks Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/subresource_filter/chrome_subresource_filter_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c1b8d152f62b03d5e417ac2d473bf657c633a109..8e47d342c9d39f5596ad3f03c25ccf30e1a9b935 100644
--- a/chrome/browser/subresource_filter/chrome_subresource_filter_client.h
+++ b/chrome/browser/subresource_filter/chrome_subresource_filter_client.h
@@ -16,6 +16,7 @@
#include "content/public/browser/web_contents_user_data.h"
class GURL;
+class SubresourceFilterContentSettingsManager;
namespace content {
class NavigationHandle;
@@ -45,7 +46,8 @@ enum SubresourceFilterAction {
// Content setting updated automatically via the standard UI.
kActionContentSettingsBlockedFromUI,
- // Content settings which target specific origins (e.g. no wildcards).
+ // Content settings which target specific origins (e.g. no wildcards). These
+ // updates do not include updates from the main UI.
kActionContentSettingsAllowed,
kActionContentSettingsBlocked,
@@ -61,6 +63,16 @@ enum SubresourceFilterAction {
// flexible.
kActionContentSettingsWildcardUpdate,
+ // The UI was suppressed due to "smart" logic which tries not to spam the UI
+ // on navigations on the same origin within a certain time.
+ 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 reported alongside
+ // kActionContentSettingsBlocked if the UI is currently in suppressed mode.
+ kActionContentSettingsBlockedWhileUISuppressed,
+
kActionLastEntry
};
@@ -94,8 +106,11 @@ class ChromeSubresourceFilterClient
static void LogAction(SubresourceFilterAction action);
private:
- ContentSetting GetContentSettingForUrl(const GURL& url);
std::set<std::string> whitelisted_hosts_;
+
+ // Owned by the profile.
+ SubresourceFilterContentSettingsManager* settings_manager_;
+
content::WebContents* web_contents_;
bool did_show_ui_for_navigation_;
« no previous file with comments | « no previous file | chrome/browser/subresource_filter/chrome_subresource_filter_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698