| 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_decision_auto_blocker.h" | 8 #include "chrome/browser/permissions/permission_decision_auto_blocker.h" |
| 9 #include "chrome/browser/permissions/permission_uma_util.h" | 9 #include "chrome/browser/permissions/permission_uma_util.h" |
| 10 #include "chrome/browser/permissions/permission_util.h" | 10 #include "chrome/browser/permissions/permission_util.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 RegisterActionTaken(); | 182 RegisterActionTaken(); |
| 183 permission_decided_callback_.Run(false, CONTENT_SETTING_DEFAULT); | 183 permission_decided_callback_.Run(false, CONTENT_SETTING_DEFAULT); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void PermissionRequestImpl::RequestFinished() { | 186 void PermissionRequestImpl::RequestFinished() { |
| 187 is_finished_ = true; | 187 is_finished_ = true; |
| 188 delete_callback_.Run(); | 188 delete_callback_.Run(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 bool PermissionRequestImpl::ShouldShowPersistenceToggle() const { | 191 bool PermissionRequestImpl::ShouldShowPersistenceToggle() const { |
| 192 return (content_settings_type_ == CONTENT_SETTINGS_TYPE_GEOLOCATION) && | 192 return PermissionUtil::ShouldShowPersistenceToggle(content_settings_type_); |
| 193 PermissionUtil::ShouldShowPersistenceToggle(); | |
| 194 } | 193 } |
| 195 | 194 |
| 196 PermissionRequestType PermissionRequestImpl::GetPermissionRequestType() | 195 PermissionRequestType PermissionRequestImpl::GetPermissionRequestType() |
| 197 const { | 196 const { |
| 198 return PermissionUtil::GetRequestType(content_settings_type_); | 197 return PermissionUtil::GetRequestType(content_settings_type_); |
| 199 } | 198 } |
| 200 | 199 |
| 201 PermissionRequestGestureType PermissionRequestImpl::GetGestureType() | 200 PermissionRequestGestureType PermissionRequestImpl::GetGestureType() |
| 202 const { | 201 const { |
| 203 return PermissionUtil::GetGestureType(has_gesture_); | 202 return PermissionUtil::GetGestureType(has_gesture_); |
| 204 } | 203 } |
| OLD | NEW |