| 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 22 matching lines...) Expand all Loading... |
| 33 permission_decided_callback_(permission_decided_callback), | 33 permission_decided_callback_(permission_decided_callback), |
| 34 delete_callback_(delete_callback), | 34 delete_callback_(delete_callback), |
| 35 is_finished_(false), | 35 is_finished_(false), |
| 36 action_taken_(false) {} | 36 action_taken_(false) {} |
| 37 | 37 |
| 38 PermissionRequestImpl::~PermissionRequestImpl() { | 38 PermissionRequestImpl::~PermissionRequestImpl() { |
| 39 DCHECK(is_finished_); | 39 DCHECK(is_finished_); |
| 40 if (!action_taken_) { | 40 if (!action_taken_) { |
| 41 PermissionUmaUtil::PermissionIgnored( | 41 PermissionUmaUtil::PermissionIgnored( |
| 42 content_settings_type_, GetGestureType(), request_origin_, profile_); | 42 content_settings_type_, GetGestureType(), request_origin_, profile_); |
| 43 PermissionUmaUtil::RecordPermissionEmbargoStatus( | 43 PermissionUmaUtil::RecordEmbargoStatus( |
| 44 PermissionEmbargoStatus::NOT_EMBARGOED); | 44 PermissionEmbargoStatus::NOT_EMBARGOED); |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 PermissionRequest::IconId PermissionRequestImpl::GetIconId() const { | 48 PermissionRequest::IconId PermissionRequestImpl::GetIconId() const { |
| 49 #if defined(OS_ANDROID) | 49 #if defined(OS_ANDROID) |
| 50 switch (content_settings_type_) { | 50 switch (content_settings_type_) { |
| 51 case CONTENT_SETTINGS_TYPE_GEOLOCATION: | 51 case CONTENT_SETTINGS_TYPE_GEOLOCATION: |
| 52 return IDR_ANDROID_INFOBAR_GEOLOCATION; | 52 return IDR_ANDROID_INFOBAR_GEOLOCATION; |
| 53 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: | 53 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 PermissionRequestType PermissionRequestImpl::GetPermissionRequestType() | 144 PermissionRequestType PermissionRequestImpl::GetPermissionRequestType() |
| 145 const { | 145 const { |
| 146 return PermissionUtil::GetRequestType(content_settings_type_); | 146 return PermissionUtil::GetRequestType(content_settings_type_); |
| 147 } | 147 } |
| 148 | 148 |
| 149 PermissionRequestGestureType PermissionRequestImpl::GetGestureType() | 149 PermissionRequestGestureType PermissionRequestImpl::GetGestureType() |
| 150 const { | 150 const { |
| 151 return PermissionUtil::GetGestureType(has_gesture_); | 151 return PermissionUtil::GetGestureType(has_gesture_); |
| 152 } | 152 } |
| OLD | NEW |