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

Unified Diff: chrome/browser/push_messaging/push_messaging_permission_context.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: Remove push messaging add comment fix nits 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
Index: chrome/browser/push_messaging/push_messaging_permission_context.cc
diff --git a/chrome/browser/push_messaging/push_messaging_permission_context.cc b/chrome/browser/push_messaging/push_messaging_permission_context.cc
index c7ae1750f57f4c5a3353d2fa372b2103ed72b1ec..a17aaf1725a4850cb3ac9940146c3d9dd79b5ebb 100644
--- a/chrome/browser/push_messaging/push_messaging_permission_context.cc
+++ b/chrome/browser/push_messaging/push_messaging_permission_context.cc
@@ -118,8 +118,11 @@ void PushMessagingPermissionContext::DecidePushPermission(
if (push_content_setting == CONTENT_SETTING_BLOCK) {
DVLOG(1) << "Push permission was explicitly blocked.";
- PermissionUmaUtil::PermissionDenied(permission_type(), requesting_origin,
- profile_);
+ // TODO(stefanocs): Pass in the actual |user_gesture| once push messaging
+ // metrics has been fixed.
+ PermissionUmaUtil::PermissionDenied(permission_type(),
kcarattini 2016/07/18 07:04:33 Can you specify what you mean by "push messaging m
stefanocs 2016/07/18 07:19:33 Done. I think Raymes is working on this one. Rayme
raymes 2016/07/18 07:31:59 Once this CL is landed it will happen automaticall
stefanocs 2016/07/18 07:40:25 In that case, I will probably just remove the comm
+ false /* user_gesture */,
+ requesting_origin, profile_);
NotifyPermissionSet(id, requesting_origin, embedding_origin, callback,
true /* persist */, CONTENT_SETTING_BLOCK);
return;
@@ -132,8 +135,10 @@ void PushMessagingPermissionContext::DecidePushPermission(
return;
}
- PermissionUmaUtil::PermissionGranted(permission_type(), requesting_origin,
- profile_);
+ // TODO(stefanocs): Pass in the actual |user_gesture| once push messaging
+ // metrics has been fixed.
+ PermissionUmaUtil::PermissionGranted(
+ permission_type(), false /* user_gesture */, requesting_origin, profile_);
NotifyPermissionSet(id, requesting_origin, embedding_origin, callback,
true /* persist */, CONTENT_SETTING_ALLOW);
}

Powered by Google App Engine
This is Rietveld 408576698