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

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

Issue 2153133002: Add gesture type value from desktop prompt to permission report (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-user-gesture-to-reporting-part
Patch Set: rebase 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 | « chrome/browser/permissions/permission_uma_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d25bc5befe38b005782c97b6a64d3cc1342fb95e..a37c0fd6acd0305ebee87f43389e449883e77a88 100644
--- a/chrome/browser/permissions/permission_uma_util.cc
+++ b/chrome/browser/permissions/permission_uma_util.cc
@@ -195,31 +195,35 @@ void PermissionUmaUtil::PermissionRequested(PermissionType permission,
}
void PermissionUmaUtil::PermissionGranted(PermissionType permission,
+ bool user_gesture,
const GURL& requesting_origin,
Profile* profile) {
RecordPermissionAction(permission, GRANTED, PermissionSourceUI::PROMPT,
- requesting_origin, profile);
+ user_gesture, requesting_origin, profile);
}
void PermissionUmaUtil::PermissionDenied(PermissionType permission,
+ bool user_gesture,
const GURL& requesting_origin,
Profile* profile) {
RecordPermissionAction(permission, DENIED, PermissionSourceUI::PROMPT,
- requesting_origin, profile);
+ user_gesture, requesting_origin, profile);
}
void PermissionUmaUtil::PermissionDismissed(PermissionType permission,
+ bool user_gesture,
const GURL& requesting_origin,
Profile* profile) {
RecordPermissionAction(permission, DISMISSED, PermissionSourceUI::PROMPT,
- requesting_origin, profile);
+ user_gesture, requesting_origin, profile);
}
void PermissionUmaUtil::PermissionIgnored(PermissionType permission,
+ bool user_gesture,
const GURL& requesting_origin,
Profile* profile) {
RecordPermissionAction(permission, IGNORED, PermissionSourceUI::PROMPT,
- requesting_origin, profile);
+ user_gesture, requesting_origin, profile);
}
void PermissionUmaUtil::PermissionRevoked(PermissionType permission,
@@ -232,8 +236,8 @@ void PermissionUmaUtil::PermissionRevoked(PermissionType permission,
permission == PermissionType::GEOLOCATION ||
permission == PermissionType::AUDIO_CAPTURE ||
permission == PermissionType::VIDEO_CAPTURE) {
- RecordPermissionAction(permission, REVOKED, source_ui, revoked_origin,
- profile);
+ RecordPermissionAction(permission, REVOKED, source_ui,
+ false /* user_gesture */, revoked_origin, profile);
timvolodine 2016/07/25 13:58:58 is this because we don't have user gestures for re
stefanocs 2016/07/25 14:22:05 Yes, revocations can only be triggered when user c
}
}
@@ -337,6 +341,7 @@ bool PermissionUmaUtil::IsOptedIntoPermissionActionReporting(Profile* profile) {
void PermissionUmaUtil::RecordPermissionAction(PermissionType permission,
PermissionAction action,
PermissionSourceUI source_ui,
+ bool user_gesture,
timvolodine 2016/07/25 13:58:58 so this is passed but not used? am I missing somet
stefanocs 2016/07/25 14:22:05 Oh right, I missed this one, this should be passed
stefanocs 2016/07/26 00:37:10 Done.
const GURL& requesting_origin,
Profile* profile) {
if (IsOptedIntoPermissionActionReporting(profile)) {
« no previous file with comments | « chrome/browser/permissions/permission_uma_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698