Index: chrome/browser/permissions/permission_util.h |
diff --git a/chrome/browser/permissions/permission_util.h b/chrome/browser/permissions/permission_util.h |
index b8faf9417ee6085d3141b6bfccbc060073bc519e..60193a0decd098c580ff5cd556555aac758f3367 100644 |
--- a/chrome/browser/permissions/permission_util.h |
+++ b/chrome/browser/permissions/permission_util.h |
@@ -35,6 +35,40 @@ 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, |
+ |
+ // Must be kept last. |
+ NUM |
raymes
2017/02/22 23:13:50
nit: I don't think this is needed anymore.
dominickn
2017/02/22 23:38:55
Done.
|
+}; |
+ |
+struct PermissionResult { |
+ PermissionResult(ContentSetting content_setting, |
+ PermissionStatusSource source); |
+ ~PermissionResult(); |
+ |
+ ContentSetting content_setting; |
+ PermissionStatusSource source; |
+}; |
raymes
2017/02/22 23:13:50
I think it would be good to move these into their
dominickn
2017/02/22 23:38:54
Acknowledged.
|
+ |
+struct PermissionTypeHash { |
+ std::size_t operator()(const content::PermissionType& type) const; |
+}; |
raymes
2017/02/22 23:13:50
Is this needed?
dominickn
2017/02/22 23:38:55
Odd, looks like whatever used it has been removed.
|
+ |
// A utility class for permissions. |
class PermissionUtil { |
public: |