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

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

Issue 2075523002: Add SourceUI field to permission report (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 5 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 | « no previous file | chrome/browser/permissions/permission_uma_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fc91244aa30c1c3f55537c5e7dffe7ad0914a842..c256c997d5014a733c6dad24f3962aa9e9688aa7 100644
--- a/chrome/browser/permissions/permission_uma_util.h
+++ b/chrome/browser/permissions/permission_uma_util.h
@@ -35,6 +35,18 @@ enum PermissionAction {
PERMISSION_ACTION_NUM,
};
+// 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 {
+ PROMPT = 0,
+ OIB = 1,
+ SITE_SETTINGS = 2,
+ PAGE_ACTION = 3,
+
+ // Always keep this at the end.
+ SOURCE_UI_NUM,
+};
+
// Provides a convenient way of logging UMA for permission related operations.
class PermissionUmaUtil {
public:
@@ -63,6 +75,7 @@ class PermissionUmaUtil {
const GURL& requesting_origin,
Profile* profile);
static void PermissionRevoked(content::PermissionType permission,
+ PermissionSourceUI source_ui,
const GURL& revoked_origin,
Profile* profile);
@@ -97,6 +110,7 @@ class PermissionUmaUtil {
static void RecordPermissionAction(content::PermissionType permission,
PermissionAction action,
+ PermissionSourceUI source_ui,
const GURL& requesting_origin,
Profile* profile);
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_uma_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698