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

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

Issue 2124703002: Record metrics for permission prompt acceptance vs. user gesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wups Created 4 years, 5 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_request.h
diff --git a/chrome/browser/permissions/permission_request.h b/chrome/browser/permissions/permission_request.h
index 67a5ae6114092dfdf257a47e3d0f433db8688d19..98453d73d5da81dd74329a3781bc296c8899a67c 100644
--- a/chrome/browser/permissions/permission_request.h
+++ b/chrome/browser/permissions/permission_request.h
@@ -37,6 +37,17 @@ enum class PermissionRequestType {
NUM
};
+// Used for UMA to record whether a gesture was associated with the request. For
+// simplicity not all request types track whether a gesture is associated with
+// it or not, for these types of requests metrics are not recorded.
+enum class PermissionRequestGestureType {
+ UNKNOWN,
+ GESTURE,
+ NO_GESTURE,
+ // NUM must be the last value in the enum.
+ NUM
+};
+
// Describes the interface a feature making permission requests should
// implement. A class of this type is registered with the permission request
// manager to receive updates about the result of the permissions request
@@ -85,6 +96,11 @@ class PermissionRequest {
// Used to record UMA metrics for permission requests.
virtual PermissionRequestType GetPermissionRequestType() const;
+
+ // Used to record UMA for whether requests are associated with a user gesture.
+ // To keep things simple this metric is only recorded for the most popular
+ // request types.
+ virtual PermissionRequestGestureType GetGestureType() const;
};
#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_H_
« no previous file with comments | « chrome/browser/permissions/permission_context_base.cc ('k') | chrome/browser/permissions/permission_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698