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

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: Remove sourceui except from PermissionRevoked 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
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 0d7c7714ec3930ae963e8b53a40f0f0751a85bed..b05848e59e9301ed5d16a8446abc54b34846cd4f 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 SourceUI {
raymes 2016/07/12 07:18:14 nit: I think we should call this PermissionSourceU
stefanocs 2016/07/13 01:23:52 Done.
+ 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:
@@ -64,6 +76,7 @@ class PermissionUmaUtil {
Profile* profile);
static void PermissionRevoked(content::PermissionType permission,
const GURL& revoked_origin,
+ SourceUI source_ui,
Profile* profile);
// UMA specifically for when permission prompts are shown. This should be
@@ -100,6 +113,7 @@ class PermissionUmaUtil {
static void RecordPermissionAction(content::PermissionType permission,
PermissionAction action,
const GURL& requesting_origin,
+ SourceUI source_ui,
raymes 2016/07/12 07:18:14 nit: I think this should go before the origin (gro
stefanocs 2016/07/13 01:23:52 Done.
Profile* profile);
};

Powered by Google App Engine
This is Rietveld 408576698