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

Unified Diff: chrome/browser/safe_browsing/permission_reporter.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: make methods static 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/safe_browsing/permission_reporter.h
diff --git a/chrome/browser/safe_browsing/permission_reporter.h b/chrome/browser/safe_browsing/permission_reporter.h
index 3bf60422a7c71e2b279f44e90ee0ba9850471ac0..2b55b35cf7b757542c0fc0678913042b2211bd0f 100644
--- a/chrome/browser/safe_browsing/permission_reporter.h
+++ b/chrome/browser/safe_browsing/permission_reporter.h
@@ -52,14 +52,18 @@ class PermissionReporter {
// The permission report includes |origin| as the origin of
// the site requesting permission, |permission| as the type of permission
// requested, |action| as the action taken, and |gesture_type| as to whether
- // the action occurred after a user gesture. The report will be serialized
- // using protobuf defined in
+ // the action occurred after a user gesture. It also includes
+ // |num_prior_dismissals| and |num_prior_ignores| the number of dismissals
+ // and ignores for this permission and origin that occurred prior to this
+ // report. The report will be serialized using protobuf defined in
// //src/chrome/common/safe_browsing/permission_report.proto
void SendReport(const GURL& origin,
content::PermissionType permission,
PermissionAction action,
PermissionSourceUI source_ui,
- PermissionRequestGestureType gesture_type);
+ PermissionRequestGestureType gesture_type,
+ int num_prior_dismissals,
Nathan Parker 2016/08/17 20:06:01 This is getting pretty long, and consecutive same-
kcarattini 2016/08/17 22:37:26 Acknowledged. Added a TODO to address this in a fo
+ int num_prior_ignores);
private:
friend class PermissionReporterBrowserTest;
@@ -80,6 +84,8 @@ class PermissionReporter {
PermissionAction action,
PermissionSourceUI source_ui,
PermissionRequestGestureType gesture_type,
+ int num_prior_dismissals,
+ int num_prior_ignores,
std::string* output);
// Returns false if the number of reports sent in the last one minute per

Powered by Google App Engine
This is Rietveld 408576698