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

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

Issue 2154033003: Add gesture type value from infobar to permission report (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-user-gesture-from-permission-layer-to-permission-report
Patch Set: nit 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/permissions/permission_infobar_delegate.cc
diff --git a/chrome/browser/permissions/permission_infobar_delegate.cc b/chrome/browser/permissions/permission_infobar_delegate.cc
index 88a2798932cfe0d44815d943eab0277acc240ea3..0bd24690eb3e68c02463f0c6e3011dfdf577c787 100644
--- a/chrome/browser/permissions/permission_infobar_delegate.cc
+++ b/chrome/browser/permissions/permission_infobar_delegate.cc
@@ -12,11 +12,12 @@
#include "ui/base/l10n/l10n_util.h"
PermissionInfobarDelegate::~PermissionInfobarDelegate() {
- // TODO(stefanocs): Pass the actual |gesture_type| value to PermissionUmaUtil.
if (!action_taken_) {
- PermissionUmaUtil::PermissionIgnored(permission_type_,
- PermissionRequestGestureType::UNKNOWN,
- requesting_origin_, profile_);
+ PermissionUmaUtil::PermissionIgnored(
+ permission_type_,
+ user_gesture_ ? PermissionRequestGestureType::GESTURE
+ : PermissionRequestGestureType::NO_GESTURE,
+ requesting_origin_, profile_);
}
}
@@ -24,12 +25,14 @@ PermissionInfobarDelegate::PermissionInfobarDelegate(
const GURL& requesting_origin,
content::PermissionType permission_type,
ContentSettingsType content_settings_type,
+ bool user_gesture,
Profile* profile,
const base::Callback<void(bool, bool)>& callback)
: requesting_origin_(requesting_origin),
action_taken_(false),
permission_type_(permission_type),
content_settings_type_(content_settings_type),
+ user_gesture_(user_gesture),
profile_(profile),
callback_(callback) {}
« no previous file with comments | « chrome/browser/permissions/permission_infobar_delegate.h ('k') | chrome/browser/permissions/permission_queue_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698