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

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

Issue 2250893002: Permission Action Reporting: Add num_prior_* fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@par-new-fields-proto
Patch Set: Also update browsertest 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: 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 997ac062388865448b6494a4e03d181a2dcb7198..ed305c8f205d352ed4c7f85129418cfa6d3d46a0 100644
--- a/chrome/browser/permissions/permission_decision_auto_blocker.h
+++ b/chrome/browser/permissions/permission_decision_auto_blocker.h
@@ -29,10 +29,19 @@ class PermissionDecisionAutoBlocker {
bool ShouldChangeDismissalToBlock(const GURL& url,
content::PermissionType permission);
+ // TODO(kcarattini): This and the below method should really be static.
raymes 2016/08/17 06:08:00 I'd be ok making these 2 functions static. Should
kcarattini 2016/08/17 06:48:45 Done.
+ // Returns the current number of dismisses recorded for |permission|
+ // type at |url|.
+ int GetDismissCount(const GURL& url,
+ content::PermissionType permission);
+
+ // Returns the current number of ignores recorded for |permission|
+ // type at |url|.
+ int GetIgnoreCount(const GURL& url,
+ content::PermissionType permission);
+
private:
friend class PermissionContextBaseTests;
- friend class PermissionDecisionAutoBlockerUnitTest;
- friend class RemovePermissionPromptCountsTest;
// Keys used for storing count data in a website setting.
static const char kPromptDismissCountKey[];
@@ -40,9 +49,9 @@ class PermissionDecisionAutoBlocker {
// Returns the current number of actions recorded under |key| for |permission|
// type at |url|.
- int GetActionCountForTest(const GURL& url,
- content::PermissionType permission,
- const char* key);
+ int GetActionCount(const GURL& url,
+ content::PermissionType permission,
+ const char* key);
// Records that the user performed an action for a prompt of type |permission|
// on |url| to a website setting keyed by |key|. Returns the total number of

Powered by Google App Engine
This is Rietveld 408576698