Chromium Code Reviews| 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 0206a20695e3b9d491a9a99ad443ee881136847c..23315f3522517904c122c19fc9d78cfab0e97b91 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); |
|
kcarattini
2016/07/18 07:04:33
I wonder if this should be true for revocations? I
stefanocs
2016/07/18 07:19:33
Done.
raymes
2016/07/18 07:31:59
I think it is good to note that they are very diff
kcarattini
2016/07/18 08:03:20
I'm fine with it being false, because it is the sa
stefanocs
2016/07/18 11:13:34
Done. Changed back to false.
|
| } |
| } |
| @@ -334,6 +338,7 @@ bool PermissionUmaUtil::IsOptedIntoPermissionActionReporting(Profile* profile) { |
| void PermissionUmaUtil::RecordPermissionAction(PermissionType permission, |
| PermissionAction action, |
| PermissionSourceUI source_ui, |
| + bool user_gesture, |
| const GURL& requesting_origin, |
| Profile* profile) { |
| if (IsOptedIntoPermissionActionReporting(profile)) { |