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

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

Issue 2651163002: Add UMA for autoblocking and embargoing. (Closed)
Patch Set: Review Created 3 years, 11 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..5662e1b8c851462f524621d6a8a85a4cb44e983a 100644
--- a/chrome/browser/permissions/permission_uma_util.h
+++ b/chrome/browser/permissions/permission_uma_util.h
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/macros.h"
+#include "base/time/time.h"
#include "chrome/browser/permissions/permission_request.h"
#include "chrome/browser/permissions/permission_util.h"
@@ -41,6 +42,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 +135,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:

Powered by Google App Engine
This is Rietveld 408576698