| OLD | NEW |
| 1 | 1 |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "chrome/browser/permissions/permission_bubble_request_impl.h" | 6 #include "chrome/browser/permissions/permission_bubble_request_impl.h" |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/permissions/permission_context_base.h" | 9 #include "chrome/browser/permissions/permission_context_base.h" |
| 10 #include "chrome/browser/permissions/permission_uma_util.h" | 10 #include "chrome/browser/permissions/permission_uma_util.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 profile_(profile), | 26 profile_(profile), |
| 27 permission_decided_callback_(permission_decided_callback), | 27 permission_decided_callback_(permission_decided_callback), |
| 28 delete_callback_(delete_callback), | 28 delete_callback_(delete_callback), |
| 29 is_finished_(false), | 29 is_finished_(false), |
| 30 action_taken_(false) {} | 30 action_taken_(false) {} |
| 31 | 31 |
| 32 PermissionBubbleRequestImpl::~PermissionBubbleRequestImpl() { | 32 PermissionBubbleRequestImpl::~PermissionBubbleRequestImpl() { |
| 33 DCHECK(is_finished_); | 33 DCHECK(is_finished_); |
| 34 if (!action_taken_) | 34 if (!action_taken_) |
| 35 PermissionUmaUtil::PermissionIgnored(permission_type_, request_origin_, | 35 PermissionUmaUtil::PermissionIgnored(permission_type_, request_origin_, |
| 36 profile_); | 36 PROMPT, profile_); |
| 37 } | 37 } |
| 38 | 38 |
| 39 gfx::VectorIconId PermissionBubbleRequestImpl::GetVectorIconId() const { | 39 gfx::VectorIconId PermissionBubbleRequestImpl::GetVectorIconId() const { |
| 40 #if !defined(OS_MACOSX) | 40 #if !defined(OS_MACOSX) |
| 41 switch (permission_type_) { | 41 switch (permission_type_) { |
| 42 case content::PermissionType::GEOLOCATION: | 42 case content::PermissionType::GEOLOCATION: |
| 43 return gfx::VectorIconId::LOCATION_ON; | 43 return gfx::VectorIconId::LOCATION_ON; |
| 44 #if defined(ENABLE_NOTIFICATIONS) | 44 #if defined(ENABLE_NOTIFICATIONS) |
| 45 case content::PermissionType::NOTIFICATIONS: | 45 case content::PermissionType::NOTIFICATIONS: |
| 46 return gfx::VectorIconId::NOTIFICATIONS; | 46 return gfx::VectorIconId::NOTIFICATIONS; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 return PermissionBubbleType::PERMISSION_PUSH_MESSAGING; | 151 return PermissionBubbleType::PERMISSION_PUSH_MESSAGING; |
| 152 #if defined(OS_CHROMEOS) | 152 #if defined(OS_CHROMEOS) |
| 153 case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: | 153 case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: |
| 154 return PermissionBubbleType::PERMISSION_PROTECTED_MEDIA_IDENTIFIER; | 154 return PermissionBubbleType::PERMISSION_PROTECTED_MEDIA_IDENTIFIER; |
| 155 #endif | 155 #endif |
| 156 default: | 156 default: |
| 157 NOTREACHED(); | 157 NOTREACHED(); |
| 158 return PermissionBubbleType::UNKNOWN; | 158 return PermissionBubbleType::UNKNOWN; |
| 159 } | 159 } |
| 160 } | 160 } |
| OLD | NEW |