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

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

Issue 2254103003: Permission Action Reporting: Bundle report data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Comments 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
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_uma_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_uma_util.h
diff --git a/chrome/browser/permissions/permission_uma_util.h b/chrome/browser/permissions/permission_uma_util.h
index e920c3e3a918576f7a20dc5bb27a5831a7b62242..38aed87f5acc73a33c9d7168b82e7f5a4bcd4f65 100644
--- a/chrome/browser/permissions/permission_uma_util.h
+++ b/chrome/browser/permissions/permission_uma_util.h
@@ -13,14 +13,13 @@
enum class PermissionRequestGestureType;
class GURL;
+class PermissionRequest;
class Profile;
namespace content {
enum class PermissionType;
} // namespace content
-class PermissionRequest;
-
// This should stay in sync with the SourceUI enum in the permission report
// protobuf (src/chrome/common/safe_browsing/permission_report.proto).
enum class PermissionSourceUI {
@@ -33,6 +32,38 @@ enum class PermissionSourceUI {
SOURCE_UI_NUM,
};
+// This should stay in sync with the PersistDecision enum in the permission
+// report message (src/chrome/common/safe_browsing/permission_report.proto).
+enum class PermissionPersistDecision {
+ UNSPECIFIED = 0,
+ PERSISTED = 1,
+ NOT_PERSISTED = 2,
+};
+
+// A bundle for the information sent in a PermissionReport.
+struct PermissionReportInfo {
+ PermissionReportInfo(
Nathan Parker 2016/08/19 00:14:34 Having this constructor sort of defeats some of th
kcarattini 2016/08/19 01:00:39 True, but at least it only happens in one place no
+ const GURL& origin,
+ content::PermissionType permission,
+ PermissionAction action,
+ PermissionSourceUI source_ui,
+ PermissionRequestGestureType gesture_type,
+ PermissionPersistDecision persist_decision,
+ int num_prior_dismissals,
+ int num_prior_ignores);
+
+ PermissionReportInfo(const PermissionReportInfo& other);
+
+ GURL origin;
+ content::PermissionType permission;
+ PermissionAction action;
+ PermissionSourceUI source_ui;
+ PermissionRequestGestureType gesture_type;
+ PermissionPersistDecision persist_decision;
+ int num_prior_dismissals;
+ int num_prior_ignores;
+};
+
// Provides a convenient way of logging UMA for permission related operations.
class PermissionUmaUtil {
public:
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_uma_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698