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

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

Issue 2701343002: Implement permission embargo suppression metrics. (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
« no previous file with comments | « chrome/browser/permissions/permission_uma_util.cc ('k') | chrome/browser/permissions/permission_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_util.h
diff --git a/chrome/browser/permissions/permission_util.h b/chrome/browser/permissions/permission_util.h
index 097203a73345aad369e072417c4a6caf2b399550..3f7c14c370c006a60c95e46e6098387d655914fa 100644
--- a/chrome/browser/permissions/permission_util.h
+++ b/chrome/browser/permissions/permission_util.h
@@ -35,6 +35,33 @@ enum PermissionAction {
PERMISSION_ACTION_NUM,
};
+// Identifies the source or reason for a permission status being returned. This
+// enum backs an UMA histogram and must be treated as append-only.
+enum class PermissionStatusSource {
+ // The reason for the status is not specified.
+ UNSPECIFIED,
+
+ // The status is the result of being blocked due to the user dismissing a
+ // permission prompt multiple times.
+ MULTIPLE_DISMISSALS,
+
+ // The status is the result of being blocked because the permission is on the
+ // safe browsing blacklist.
+ SAFE_BROWSING_BLACKLIST,
+
+ // The status is the result of being blocked by the permissions kill switch.
+ KILL_SWITCH,
+};
+
+struct PermissionResult {
+ PermissionResult(ContentSetting content_setting,
+ PermissionStatusSource source);
+ ~PermissionResult();
+
+ ContentSetting content_setting;
+ PermissionStatusSource source;
+};
+
// A utility class for permissions.
class PermissionUtil {
public:
« no previous file with comments | « chrome/browser/permissions/permission_uma_util.cc ('k') | chrome/browser/permissions/permission_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698