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

Unified Diff: chrome/browser/ui/website_settings/permission_bubble_request.h

Issue 1884073002: Add a new metric for how many times permissions prompts are shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update histograms type name Created 4 years, 8 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 9da18802c0140d08db1ec94f16a90e49603ec84c..1c13cb8171fb503a5b6d70556b7b2579090e5e31 100644
--- a/chrome/browser/ui/website_settings/permission_bubble_request.h
+++ b/chrome/browser/ui/website_settings/permission_bubble_request.h
@@ -12,6 +12,24 @@ namespace gfx {
enum class VectorIconId;
}
+// Used for UMA to record the types of permission prompts shown.
+// This corresponds to the PermissionBubbleType enum in
+// src/tools/metrics/histograms.xml. The usual rules of updating UMA values
+// applies to this enum:
+// - don't remove values
+// - only ever add values at the end
+// - keep the PermissionBubbleType enum in sync with this definition.
+enum class PermissionBubbleType {
Lei Zhang 2016/04/19 01:46:05 s/class //
Lei Zhang 2016/04/19 01:55:45 Ignore. I've been hiding under a rock and forgot a
+ UNKNOWN,
+ MULTIPLE,
+ PERMISSION,
+ QUOTA,
+ DOWNLOAD,
+ MEDIA_STREAM,
+ REGISTER_PROTOCOL_HANDLER,
+ NUM
Lei Zhang 2016/04/19 01:46:05 Add comment to note this must be last.
benwells 2016/04/20 01:32:10 Done.
+};
+
// 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
@@ -62,6 +80,8 @@ class PermissionBubbleRequest {
// no further message from the permission bubble system. This method will
// eventually be called on every request which is not unregistered.
virtual void RequestFinished() = 0;
+
+ virtual PermissionBubbleType GetPermissionBubbleType() const;
};
#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_

Powered by Google App Engine
This is Rietveld 408576698