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

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

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: Move permissions stuff to SensorProxy, remove aw related stuff 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 b4dae09ec9c4070f4c72ec96544f6e9af9855575..4623328606a7df2dd0f42f8a1cd5d0ccf555ff51 100644
--- a/chrome/browser/permissions/permission_uma_util.cc
+++ b/chrome/browser/permissions/permission_uma_util.cc
@@ -505,6 +505,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:
@@ -556,6 +560,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:
@@ -646,6 +655,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