Index: chrome/browser/permissions/permission_context_base.cc |
diff --git a/chrome/browser/permissions/permission_context_base.cc b/chrome/browser/permissions/permission_context_base.cc |
index 776322302c31e92852741a3b92d17d648e41a30b..0e5ac6a0873f5bbfcc05b2bc236ff69f23734567 100644 |
--- a/chrome/browser/permissions/permission_context_base.cc |
+++ b/chrome/browser/permissions/permission_context_base.cc |
@@ -225,10 +225,15 @@ PermissionResult PermissionContextBase::GetPermissionStatus( |
PermissionStatusSource::KILL_SWITCH); |
} |
- if (IsRestrictedToSecureOrigins() && |
- !content::IsOriginSecure(requesting_origin)) { |
- return PermissionResult(CONTENT_SETTING_BLOCK, |
- PermissionStatusSource::UNSPECIFIED); |
+ if (IsRestrictedToSecureOrigins()) { |
+ // TODO(raymes): We should check the entire chain of embedders here whenever |
+ // possible as this corresponds to the requirements of the secure contexts |
+ // spec and matches what is implemented in blink. |
+ if (!content::IsOriginSecure(requesting_origin) || |
+ !content::IsOriginSecure(embedding_origin)) { |
+ return PermissionResult(CONTENT_SETTING_BLOCK, |
+ PermissionStatusSource::UNSPECIFIED); |
+ } |
} |
ContentSetting content_setting = GetPermissionStatusInternal( |