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

Unified Diff: chrome/browser/ui/website_settings/permission_bubble_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: Add histograms 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/ui/website_settings/permission_bubble_request.h
diff --git a/chrome/browser/ui/website_settings/permission_bubble_request.h b/chrome/browser/ui/website_settings/permission_bubble_request.h
index 05fb88b37b2d088c818a79a6386324070d880951..71512c5b5b9f8b66171b78691e82ea682647fb3c 100644
--- a/chrome/browser/ui/website_settings/permission_bubble_request.h
+++ b/chrome/browser/ui/website_settings/permission_bubble_request.h
@@ -37,6 +37,17 @@ enum class PermissionBubbleType {
NUM
};
+// Used for UMA to record whether a gesture was associated with the bubble. For
+// simplicity not all bubble types track whether a gesture is associated with it
+// or not, for these types of bubbles metrics are not recorded.
+enum class PermissionBubbleGestureType {
+ UNKNOWN,
+ GESTURE,
+ NO_GESTURE,
+ // NUM must be the last value in the enum.
+ NUM
+};
+
// Describes the interface a feature utilizing permission bubbles should
// implement. A class of this type is registered with the permission bubble
// manager to receive updates about the result of the permissions request
@@ -85,6 +96,11 @@ class PermissionBubbleRequest {
// Used to record UMA metrics for bubbles.
virtual PermissionBubbleType GetPermissionBubbleType() const;
+
+ // Used to record UMA for whether bubbles are associated with a user gesture.
+ // To keep things simple this metric is only recorded for the most popular
+ // bubble types.
+ virtual PermissionBubbleGestureType GetGestureType() const;
};
#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_

Powered by Google App Engine
This is Rietveld 408576698