| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/permissions/permission_request_impl.h" | 5 #include "chrome/browser/permissions/permission_request_impl.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/permissions/permission_uma_util.h" | 8 #include "chrome/browser/permissions/permission_uma_util.h" |
| 9 #include "chrome/browser/permissions/permission_util.h" | 9 #include "chrome/browser/permissions/permission_util.h" |
| 10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 permission_decided_callback_(permission_decided_callback), | 31 permission_decided_callback_(permission_decided_callback), |
| 32 delete_callback_(delete_callback), | 32 delete_callback_(delete_callback), |
| 33 is_finished_(false), | 33 is_finished_(false), |
| 34 action_taken_(false) {} | 34 action_taken_(false) {} |
| 35 | 35 |
| 36 PermissionRequestImpl::~PermissionRequestImpl() { | 36 PermissionRequestImpl::~PermissionRequestImpl() { |
| 37 DCHECK(is_finished_); | 37 DCHECK(is_finished_); |
| 38 if (!action_taken_) { | 38 if (!action_taken_) { |
| 39 PermissionUmaUtil::PermissionIgnored(permission_type_, GetGestureType(), | 39 PermissionUmaUtil::PermissionIgnored(permission_type_, GetGestureType(), |
| 40 request_origin_, profile_); | 40 request_origin_, profile_); |
| 41 PermissionUmaUtil::RecordPermissionEmbargoReason( |
| 42 PermissionEmbargoReason::NOT_EMBARGOED); |
| 41 } | 43 } |
| 42 } | 44 } |
| 43 | 45 |
| 44 PermissionRequest::IconId PermissionRequestImpl::GetIconId() const { | 46 PermissionRequest::IconId PermissionRequestImpl::GetIconId() const { |
| 45 #if defined(OS_ANDROID) | 47 #if defined(OS_ANDROID) |
| 46 switch (permission_type_) { | 48 switch (permission_type_) { |
| 47 case content::PermissionType::GEOLOCATION: | 49 case content::PermissionType::GEOLOCATION: |
| 48 return IDR_ANDROID_INFOBAR_GEOLOCATION; | 50 return IDR_ANDROID_INFOBAR_GEOLOCATION; |
| 49 case content::PermissionType::NOTIFICATIONS: | 51 case content::PermissionType::NOTIFICATIONS: |
| 50 case content::PermissionType::PUSH_MESSAGING: | 52 case content::PermissionType::PUSH_MESSAGING: |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: | 162 case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: |
| 161 return CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER; | 163 return CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER; |
| 162 #endif | 164 #endif |
| 163 case content::PermissionType::FLASH: | 165 case content::PermissionType::FLASH: |
| 164 return CONTENT_SETTINGS_TYPE_PLUGINS; | 166 return CONTENT_SETTINGS_TYPE_PLUGINS; |
| 165 default: | 167 default: |
| 166 NOTREACHED(); | 168 NOTREACHED(); |
| 167 return CONTENT_SETTINGS_TYPE_DEFAULT; | 169 return CONTENT_SETTINGS_TYPE_DEFAULT; |
| 168 } | 170 } |
| 169 } | 171 } |
| OLD | NEW |