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

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: todo 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..591ad60007f8092e83b527c8e750bad0278ca614 100644
--- a/chrome/browser/safe_browsing/permission_reporter.h
+++ b/chrome/browser/safe_browsing/permission_reporter.h
@@ -52,14 +52,20 @@ 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
+ //
+ // TODO(kcarattini): Move these params to a PermissionReportInfo struct.
void SendReport(const GURL& origin,
content::PermissionType permission,
PermissionAction action,
PermissionSourceUI source_ui,
- PermissionRequestGestureType gesture_type);
+ PermissionRequestGestureType gesture_type,
+ int num_prior_dismissals,
+ int num_prior_ignores);
private:
friend class PermissionReporterBrowserTest;
@@ -80,6 +86,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
« no previous file with comments | « chrome/browser/permissions/permission_uma_util.cc ('k') | chrome/browser/safe_browsing/permission_reporter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698