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

Unified Diff: chrome/browser/permissions/permission_decision_auto_blocker.h

Issue 2790493002: Implement permissions embargo for prompts which are repeatedly ignored. (Closed)
Patch Set: Not for plugins Created 3 years, 9 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: chrome/browser/permissions/permission_decision_auto_blocker.h
diff --git a/chrome/browser/permissions/permission_decision_auto_blocker.h b/chrome/browser/permissions/permission_decision_auto_blocker.h
index c334628dd5188bf22609c2088c7009c9a7dc5d06..24e07b50659504e9f842f31b02ff411d061bfc8b 100644
--- a/chrome/browser/permissions/permission_decision_auto_blocker.h
+++ b/chrome/browser/permissions/permission_decision_auto_blocker.h
@@ -85,12 +85,15 @@ class PermissionDecisionAutoBlocker : public KeyedService {
// Records that a dismissal of a prompt for |permission| was made. If the
// total number of dismissals exceeds a threshhold and
- // features::kBlockPromptsIfDismissedOften is enabled it will place |url|
+ // features::kBlockPromptsIfDismissedOften is enabled, it will place |url|
// under embargo for |permission|.
bool RecordDismissAndEmbargo(const GURL& url, ContentSettingsType permission);
- // Records that an ignore of a prompt for |permission| was made.
- int RecordIgnore(const GURL& url, ContentSettingsType permission);
+ // Records that an ignore of a prompt for |permission| was made. If the total
+ // number of ignores exceeds a threshold and
+ // features::kBlockPromptsIfIgnoredOften is enabled, it will place |url| under
+ // embargo for |permission|.
+ bool RecordIgnoreAndEmbargo(const GURL& url, ContentSettingsType permission);
// Removes any recorded counts for urls which match |filter|.
void RemoveCountsByUrl(base::Callback<bool(const GURL& url)> filter);
@@ -123,6 +126,7 @@ class PermissionDecisionAutoBlocker : public KeyedService {
static const char kPromptDismissCountKey[];
static const char kPromptIgnoreCountKey[];
static const char kPermissionDismissalEmbargoKey[];
+ static const char kPermissionIgnoreEmbargoKey[];
static const char kPermissionBlacklistEmbargoKey[];
Profile* profile_;
« no previous file with comments | « chrome/browser/permissions/permission_context_base.cc ('k') | chrome/browser/permissions/permission_decision_auto_blocker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698