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

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

Issue 2684913002: Add UMA for recording embargo reasons and autoblocker interactions. (Closed)
Patch Set: rebase Created 3 years, 10 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_uma_util.h
diff --git a/chrome/browser/permissions/permission_uma_util.h b/chrome/browser/permissions/permission_uma_util.h
index 61a08d9356ef7a2adfeed6bfc62eed93bfdae058..1c47ffb07d1a0d2ffedcf5eb9127d4004d7fdd6d 100644
--- a/chrome/browser/permissions/permission_uma_util.h
+++ b/chrome/browser/permissions/permission_uma_util.h
@@ -65,6 +65,15 @@ struct PermissionReportInfo {
int num_prior_ignores;
};
+enum PermissionEmbargoReason {
kcarattini 2017/02/09 00:17:33 Nit: What about PermissionEmbargoStatus instead of
meredithl 2017/02/09 02:58:28 Done.
+ NOT_EMBARGOED = 0,
+ BLACKLISTED = 1,
+ REPEATED_DISMISSALS = 2,
+
+ // Keep this at the end.
+ REASON_NUM,
+};
+
// Provides a convenient way of logging UMA for permission related operations.
class PermissionUmaUtil {
public:
@@ -114,7 +123,8 @@ class PermissionUmaUtil {
PermissionSourceUI source_ui,
const GURL& revoked_origin,
Profile* profile);
-
+ static void RecordPermissionEmbargoReason(
+ PermissionEmbargoReason embargo_reason);
raymes 2017/02/08 23:20:09 nit: please add a newline after this
meredithl 2017/02/09 00:15:37 Done.
// UMA specifically for when permission prompts are shown. This should be
// roughly equivalent to the metrics above, however it is
// useful to have separate UMA to a few reasons:

Powered by Google App Engine
This is Rietveld 408576698