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

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

Issue 2678253002: Add metrics for Safe Browsing blacklist response. (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..8a603ef2360b9a61b0957a8c9049cae69797fe99 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,16 @@ enum class PermissionPersistDecision {
NOT_PERSISTED = 2,
};
+// 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 +125,8 @@ class PermissionUmaUtil {
PermissionSourceUI source_ui,
const GURL& revoked_origin,
Profile* profile);
-
+ static void RecordSafeBrowsingResponse(base::TimeDelta response_time,
+ SafeBrowsingResponse response);
// 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