Commit 30c82cae authored by Ian Clelland's avatar Ian Clelland Committed by Commit Bot

Remove default:none from permissions policy

The 'none' default allowlist has been removed from the spec, as it was
never used, and further spec changes have made it unlikely that it will
be usable in the future.

Bug: 1095641
Change-Id: Ib7b5eae2e022f726dc6dc616ef3382f2d82861df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2354419Reviewed-by: default avatarCharlie Hu <chenleihu@google.com>
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798722}
parent f991bfa6
...@@ -146,9 +146,8 @@ bool FeaturePolicy::GetFeatureValueForOrigin( ...@@ -146,9 +146,8 @@ bool FeaturePolicy::GetFeatureValueForOrigin(
// If no "allowlist" is specified, return default feature value. // If no "allowlist" is specified, return default feature value.
const FeaturePolicyFeatureDefault default_policy = feature_list_.at(feature); const FeaturePolicyFeatureDefault default_policy = feature_list_.at(feature);
if (default_policy == FeaturePolicyFeatureDefault::DisableForAll || if (default_policy == FeaturePolicyFeatureDefault::EnableForSelf &&
(default_policy == FeaturePolicyFeatureDefault::EnableForSelf && !origin_.IsSameOriginWith(origin))
!origin_.IsSameOriginWith(origin)))
return false; return false;
return inherited_value; return inherited_value;
} }
......
...@@ -18,10 +18,6 @@ namespace blink { ...@@ -18,10 +18,6 @@ namespace blink {
// //
// The default values for each feature are set in GetDefaultFeatureList. // The default values for each feature are set in GetDefaultFeatureList.
enum class FeaturePolicyFeatureDefault { enum class FeaturePolicyFeatureDefault {
// Equivalent to []. If this default policy is in effect for a frame, then
// the feature will not be enabled for that frame or any of its children.
DisableForAll,
// Equivalent to ["self"]. If this default policy is in effect for a frame, // Equivalent to ["self"]. If this default policy is in effect for a frame,
// then the feature will be enabled for that frame, and any same-origin // then the feature will be enabled for that frame, and any same-origin
// child frames, but not for any cross-origin child frames. // child frames, but not for any cross-origin child frames.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment