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

Unified Diff: chrome/browser/safe_browsing/permission_reporter.h

Issue 2254103003: Permission Action Reporting: Bundle report data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 591ad60007f8092e83b527c8e750bad0278ca614..a19c75f177769d7217077c3fdfb623e42e4100b3 100644
--- a/chrome/browser/safe_browsing/permission_reporter.h
+++ b/chrome/browser/safe_browsing/permission_reporter.h
@@ -10,7 +10,6 @@
#include <unordered_map>
#include "base/time/time.h"
-#include "chrome/browser/permissions/permission_request.h"
#include "chrome/browser/permissions/permission_uma_util.h"
#include "url/gurl.h"
@@ -49,23 +48,11 @@ class PermissionReporter {
~PermissionReporter();
// Sends a serialized permission report to the report collection server.
- // 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. 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
+ // The permission report includes the origin of the site requesting the
raymes 2016/08/18 07:09:57 nit: requesting the...
kcarattini 2016/08/18 07:23:27 Done.
+ // and other information about the permission action included in
+ // |report_info|. 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,
- int num_prior_dismissals,
- int num_prior_ignores);
+ void SendReport(const PermissionReportInfo& report_info);
private:
friend class PermissionReporterBrowserTest;
@@ -76,18 +63,10 @@ class PermissionReporter {
PermissionReporter(std::unique_ptr<net::ReportSender> report_sender,
std::unique_ptr<base::Clock> clock);
- // Builds and serializes a permission report with |origin| as the origin of
- // the site requesting permission, |permission| as the type of permission
- // requested, and |action| as the action taken. The serialized report is
- // written into |output|. Returns true if the serialization was successful and
- // false otherwise.
- static bool BuildReport(const GURL& origin,
- content::PermissionType permission,
- PermissionAction action,
- PermissionSourceUI source_ui,
- PermissionRequestGestureType gesture_type,
- int num_prior_dismissals,
- int num_prior_ignores,
+ // Builds and serializes a permission report with |report_info| included.
+ // The serialized report is written into |output|. Returns true if the
+ // serialization was successful and false otherwise.
+ static bool BuildReport(const PermissionReportInfo& report_info,
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