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

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

Issue 2908133003: Split GetPermissionStatus into GetPermissionStatusForFrame/Worker
Patch Set: Split GetPermissionStatus into GetPermissionStatusForFrame/Worker 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_context_base.h" 5 #include "chrome/browser/permissions/permission_context_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 287 }
288 } else { 288 } else {
289 #if defined(OS_ANDROID) 289 #if defined(OS_ANDROID)
290 GetQueueController()->CancelInfoBarRequest(id); 290 GetQueueController()->CancelInfoBarRequest(id);
291 #else 291 #else
292 NOTREACHED(); 292 NOTREACHED();
293 #endif 293 #endif
294 } 294 }
295 } 295 }
296 296
297 bool PermissionContextBase::IsAllowedInWorkers() const {
298 return false;
299 }
300
297 bool PermissionContextBase::IsPermissionKillSwitchOn() const { 301 bool PermissionContextBase::IsPermissionKillSwitchOn() const {
298 const std::string param = variations::GetVariationParamValue( 302 const std::string param = variations::GetVariationParamValue(
299 kPermissionsKillSwitchFieldStudy, 303 kPermissionsKillSwitchFieldStudy,
300 PermissionUtil::GetPermissionString(content_settings_type_)); 304 PermissionUtil::GetPermissionString(content_settings_type_));
301 305
302 return param == kPermissionsKillSwitchBlockedValue; 306 return param == kPermissionsKillSwitchBlockedValue;
303 } 307 }
304 308
305 ContentSetting PermissionContextBase::GetPermissionStatusInternal( 309 ContentSetting PermissionContextBase::GetPermissionStatusInternal(
306 content::RenderFrameHost* render_frame_host, 310 content::RenderFrameHost* render_frame_host,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 content_settings_storage_type(), 460 content_settings_storage_type(),
457 std::string(), content_setting); 461 std::string(), content_setting);
458 } 462 }
459 463
460 ContentSettingsType PermissionContextBase::content_settings_storage_type() 464 ContentSettingsType PermissionContextBase::content_settings_storage_type()
461 const { 465 const {
462 if (content_settings_type_ == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING) 466 if (content_settings_type_ == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING)
463 return CONTENT_SETTINGS_TYPE_NOTIFICATIONS; 467 return CONTENT_SETTINGS_TYPE_NOTIFICATIONS;
464 return content_settings_type_; 468 return content_settings_type_;
465 } 469 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698