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

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

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: Handle Denied and Ask differently, add permissionService.reset() Created 4 years, 1 month 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 8fe88da3c408c67b29f975f3ffb4eece806f58b3..6b0c024023b85697f13955138554537d934f529e 100644
--- a/chrome/browser/permissions/permission_uma_util.cc
+++ b/chrome/browser/permissions/permission_uma_util.cc
@@ -520,6 +520,10 @@ void PermissionUmaUtil::PermissionPromptAcceptedWithPersistenceToggle(
UMA_HISTOGRAM_BOOLEAN("Permissions.Prompt.Accepted.Persisted.Flash",
toggle_enabled);
break;
+
+ case PermissionType::SENSORS:
+ // TODO(riju): when UMA is ready.
+ break;
// The user is not prompted for these permissions, thus there is no accept
// recorded for them.
case PermissionType::MIDI:
@@ -571,6 +575,11 @@ void PermissionUmaUtil::PermissionPromptDeniedWithPersistenceToggle(
UMA_HISTOGRAM_BOOLEAN("Permissions.Prompt.Denied.Persisted.Flash",
toggle_enabled);
break;
+ case PermissionType::SENSORS:
+ // TODO(riju): when UMA is ready.
+ // The user is not prompted for these permissions, thus there is no accept
+ // recorded for them.
+ break;
// The user is not prompted for these permissions, thus there is no deny
// recorded for them.
case PermissionType::MIDI:
@@ -661,6 +670,15 @@ void PermissionUmaUtil::RecordPermissionAction(
"Permissions.Action.InsecureOrigin.MidiSysEx",
action);
break;
+ // TODO(riju) : when UMA is ready.
+ case PermissionType::SENSORS:
+ /*
+ PERMISSION_ACTION_UMA(secure_origin, "Permissions.Action.Sensors",
+ "Permissions.Action.SecureOrigin.Sensors",
+ "Permissions.Action.InsecureOrigin.Sensors",
+ action);
+ */
+ break;
case PermissionType::PUSH_MESSAGING:
PERMISSION_ACTION_UMA(secure_origin, "Permissions.Action.PushMessaging",
"Permissions.Action.SecureOrigin.PushMessaging",

Powered by Google App Engine
This is Rietveld 408576698