Files
brave-core/patches/components-permissions-permission_context_base.cc.patch

38 lines
1.9 KiB
Diff

diff --git a/components/permissions/permission_context_base.cc b/components/permissions/permission_context_base.cc
index 7777d58ad1b8600a35de9d80ed1e305b231b7917..0e108e0b8a1fe9c6a9eda02f09aca116617bea57 100644
--- a/components/permissions/permission_context_base.cc
+++ b/components/permissions/permission_context_base.cc
@@ -75,7 +75,7 @@
#include "ui/android/window_android.h"
#endif
-namespace permissions {
+namespace permissions::chromium_impl {
namespace {
using PermissionStatus = blink::mojom::PermissionStatus;
@@ -528,7 +528,7 @@ bool PermissionContextBase::IsPermissionAvailableToOrigins(
// possible as this corresponds to the requirements of the secure contexts
// spec and matches what is implemented in blink. Right now we just check
// the top level and requesting origins.
- if (!PermissionsClient::Get()->CanBypassEmbeddingOriginCheck(
+ if (!PermissionsClient::Get()->BraveCanBypassEmbeddingOriginCheck(content_settings_type_,
requesting_origin, embedding_origin) &&
!network::IsUrlPotentiallyTrustworthy(embedding_origin)) {
return false;
@@ -644,7 +644,7 @@ void PermissionContextBase::DecidePermission(
// origin displayed in the prompt should never differ from the top-level
// origin. Storage access API requests are excluded as they are expected to
// request permissions from the frame origin needing access.
- DCHECK(PermissionsClient::Get()->CanBypassEmbeddingOriginCheck(
+ DCHECK(PermissionsClient::Get()->BraveCanBypassEmbeddingOriginCheck(content_settings_type_,
request_data->requesting_origin, request_data->embedding_origin) ||
request_data->requesting_origin == request_data->embedding_origin ||
content_settings_type_ == ContentSettingsType::STORAGE_ACCESS);
@@ -938,4 +938,4 @@ void PermissionContextBase::NotifyObservers(
}
}
-} // namespace permissions
+} // namespace permissions::chromium_impl