| 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..0898ce7d7235529aeb20e683f8b20299fb336b9b 100644
|
| --- a/chrome/browser/permissions/permission_uma_util.h
|
| +++ b/chrome/browser/permissions/permission_uma_util.h
|
| @@ -21,6 +21,10 @@ namespace content {
|
| enum class PermissionType;
|
| } // namespace content
|
|
|
| +namespace base {
|
| +class TimeDelta;
|
| +} // namespace base
|
| +
|
| // This should stay in sync with the SourceUI enum in the permission report
|
| // protobuf (src/chrome/common/safe_browsing/permission_report.proto).
|
| enum class PermissionSourceUI {
|
| @@ -41,6 +45,26 @@ enum class PermissionPersistDecision {
|
| NOT_PERSISTED = 2,
|
| };
|
|
|
| +// Any new values should be inserted immediately prior to REASON_NUM.
|
| +enum PermissionEmbargoReason {
|
| + REPEATED_DISMISSALS = 0,
|
| + PERMISSIONS_BLACKLISTING = 1,
|
| + NOT_EMBARGOED = 2,
|
| +
|
| + // Always keep this at the end.
|
| + REASON_NUM,
|
| +};
|
| +
|
| +// Any new values should be inserted immediately prior to RESPONSE_NUM.
|
| +enum SafeBrowsingResponse {
|
| + NOT_BLACKLISTED = 0,
|
| + TIMEOUT = 1,
|
| + BLACKLISTED = 2,
|
| +
|
| + // Always keep this at the end.
|
| + RESPONSE_NUM,
|
| +};
|
| +
|
| // A bundle for the information sent in a PermissionReport.
|
| struct PermissionReportInfo {
|
| PermissionReportInfo(
|
| @@ -114,7 +138,11 @@ class PermissionUmaUtil {
|
| PermissionSourceUI source_ui,
|
| const GURL& revoked_origin,
|
| Profile* profile);
|
| -
|
| + static void RecordPermissionEmbargoReason(
|
| + PermissionEmbargoReason embargo_reason);
|
| + static void RecordSafeBrowsingResponse(base::TimeDelta response_time,
|
| + SafeBrowsingResponse response);
|
| + static void RecordRepeatedEmbargo(PermissionEmbargoReason embargo_reason);
|
| // 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:
|
|
|