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

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

Issue 2339093002: [HBD] Add Plugins permission type and PermissionContext (Closed)
Patch Set: [HBD] Add Plugins permission type and PermissionContext Created 4 years, 3 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.cc
diff --git a/chrome/browser/permissions/permission_uma_util.cc b/chrome/browser/permissions/permission_uma_util.cc
index 7013b2ceada4df23f4a35ca627241d2da7532054..adb997865226a095b4a512bf0c773d028f42f4a5 100644
--- a/chrome/browser/permissions/permission_uma_util.cc
+++ b/chrome/browser/permissions/permission_uma_util.cc
@@ -496,6 +496,10 @@ void PermissionUmaUtil::PermissionPromptAcceptedWithPersistenceToggle(
UMA_HISTOGRAM_BOOLEAN(
"Permissions.Prompt.Accepted.Persisted.VideoCapture", toggle_enabled);
break;
+ case PermissionType::PLUGINS:
+ UMA_HISTOGRAM_BOOLEAN("Permissions.Prompt.Accepted.Persisted.Plugins",
+ toggle_enabled);
+ break;
// The user is not prompted for these permissions, thus there is no accept
// recorded for them.
case PermissionType::MIDI:
@@ -543,6 +547,10 @@ void PermissionUmaUtil::PermissionPromptDeniedWithPersistenceToggle(
UMA_HISTOGRAM_BOOLEAN("Permissions.Prompt.Denied.Persisted.VideoCapture",
toggle_enabled);
break;
+ case PermissionType::PLUGINS:
+ UMA_HISTOGRAM_BOOLEAN("Permissions.Prompt.Denied.Persisted.Plugins",
+ toggle_enabled);
+ break;
// The user is not prompted for these permissions, thus there is no deny
// recorded for them.
case PermissionType::MIDI:
@@ -661,6 +669,12 @@ void PermissionUmaUtil::RecordPermissionAction(
UMA_HISTOGRAM_ENUMERATION("Permissions.Action.VideoCapture", action,
PERMISSION_ACTION_NUM);
break;
+ case PermissionType::PLUGINS:
+ PERMISSION_ACTION_UMA(secure_origin, "Permissions.Action.Plugins",
+ "Permissions.Action.SecureOrigin.Plugins",
+ "Permissions.Action.InsecureOrigin.Plugins",
+ action);
+ break;
// The user is not prompted for these permissions, thus there is no
// permission action recorded for them.
case PermissionType::MIDI:
« no previous file with comments | « chrome/browser/permissions/permission_request_impl.cc ('k') | chrome/browser/permissions/permission_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698