Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: chrome/browser/permissions/permission_request_impl.cc

Issue 2909453002: Support persist toggle in PermissionRequestManager path on Android (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 RegisterActionTaken(); 187 RegisterActionTaken();
188 permission_decided_callback_.Run(false, CONTENT_SETTING_DEFAULT); 188 permission_decided_callback_.Run(false, CONTENT_SETTING_DEFAULT);
189 } 189 }
190 190
191 void PermissionRequestImpl::RequestFinished() { 191 void PermissionRequestImpl::RequestFinished() {
192 is_finished_ = true; 192 is_finished_ = true;
193 delete_callback_.Run(); 193 delete_callback_.Run();
194 } 194 }
195 195
196 bool PermissionRequestImpl::ShouldShowPersistenceToggle() const { 196 bool PermissionRequestImpl::ShouldShowPersistenceToggle() const {
197 return (content_settings_type_ == CONTENT_SETTINGS_TYPE_GEOLOCATION) && 197 return PermissionUtil::ShouldShowPersistenceToggle(content_settings_type_);
198 PermissionUtil::ShouldShowPersistenceToggle();
199 } 198 }
200 199
201 PermissionRequestType PermissionRequestImpl::GetPermissionRequestType() 200 PermissionRequestType PermissionRequestImpl::GetPermissionRequestType()
202 const { 201 const {
203 return PermissionUtil::GetRequestType(content_settings_type_); 202 return PermissionUtil::GetRequestType(content_settings_type_);
204 } 203 }
205 204
206 PermissionRequestGestureType PermissionRequestImpl::GetGestureType() 205 PermissionRequestGestureType PermissionRequestImpl::GetGestureType()
207 const { 206 const {
208 return PermissionUtil::GetGestureType(has_gesture_); 207 return PermissionUtil::GetGestureType(has_gesture_);
209 } 208 }
210 209
211 ContentSettingsType PermissionRequestImpl::GetContentSettingsType() const { 210 ContentSettingsType PermissionRequestImpl::GetContentSettingsType() const {
212 return content_settings_type_; 211 return content_settings_type_;
213 } 212 }
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_prompt_android.cc ('k') | chrome/browser/permissions/permission_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698