| Index: chrome/browser/permissions/permission_context_base.cc
|
| diff --git a/chrome/browser/permissions/permission_context_base.cc b/chrome/browser/permissions/permission_context_base.cc
|
| index 5c99fbd3668796176b5a1b073fa2f16d013f9c3b..4fbe7f9a93e10c26334648f144233f914e30c87d 100644
|
| --- a/chrome/browser/permissions/permission_context_base.cc
|
| +++ b/chrome/browser/permissions/permission_context_base.cc
|
| @@ -224,26 +224,26 @@ void PermissionContextBase::PermissionDecided(
|
| const BrowserPermissionCallback& callback,
|
| bool persist,
|
| ContentSetting content_setting) {
|
| -#if !defined(OS_ANDROID)
|
| - // Infobar persistence and its related UMA is tracked on the infobar
|
| - // controller directly.
|
| - PermissionRequestGestureType gesture_type =
|
| - user_gesture ? PermissionRequestGestureType::GESTURE
|
| - : PermissionRequestGestureType::NO_GESTURE;
|
| - DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
|
| - content_setting == CONTENT_SETTING_BLOCK ||
|
| - content_setting == CONTENT_SETTING_DEFAULT);
|
| - if (content_setting == CONTENT_SETTING_ALLOW) {
|
| - PermissionUmaUtil::PermissionGranted(permission_type_, gesture_type,
|
| - requesting_origin, profile_);
|
| - } else if (content_setting == CONTENT_SETTING_BLOCK) {
|
| - PermissionUmaUtil::PermissionDenied(permission_type_, gesture_type,
|
| - requesting_origin, profile_);
|
| - } else {
|
| - PermissionUmaUtil::PermissionDismissed(permission_type_, gesture_type,
|
| + if (PermissionRequestManager::IsEnabled()) {
|
| + // Infobar persistence and its related UMA is tracked on the infobar
|
| + // controller directly.
|
| + PermissionRequestGestureType gesture_type =
|
| + user_gesture ? PermissionRequestGestureType::GESTURE
|
| + : PermissionRequestGestureType::NO_GESTURE;
|
| + DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
|
| + content_setting == CONTENT_SETTING_BLOCK ||
|
| + content_setting == CONTENT_SETTING_DEFAULT);
|
| + if (content_setting == CONTENT_SETTING_ALLOW) {
|
| + PermissionUmaUtil::PermissionGranted(permission_type_, gesture_type,
|
| requesting_origin, profile_);
|
| + } else if (content_setting == CONTENT_SETTING_BLOCK) {
|
| + PermissionUmaUtil::PermissionDenied(permission_type_, gesture_type,
|
| + requesting_origin, profile_);
|
| + } else {
|
| + PermissionUmaUtil::PermissionDismissed(permission_type_, gesture_type,
|
| + requesting_origin, profile_);
|
| + }
|
| }
|
| -#endif
|
|
|
| // Check if we should convert a dismiss decision into a block decision. This
|
| // is gated on enabling the kBlockPromptsIfDismissedOften feature.
|
|
|