Commit ce77e4b6 authored by Luna Lu's avatar Luna Lu Committed by Commit Bot

Remove unshipped features from feature policy

Bug: 810833
Change-Id: Ia001570d879a714c0002c2270ff8273bf046f508
Reviewed-on: https://chromium-review.googlesource.com/1097228Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Reviewed-by: default avatarIan Clelland <iclelland@chromium.org>
Commit-Queue: Luna Lu <loonybear@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567279}
parent 5d7fb33e
...@@ -264,10 +264,6 @@ const FeaturePolicy::FeatureList& FeaturePolicy::GetDefaultFeatureList() { ...@@ -264,10 +264,6 @@ const FeaturePolicy::FeatureList& FeaturePolicy::GetDefaultFeatureList() {
FeaturePolicy::FeatureDefault::EnableForSelf}, FeaturePolicy::FeatureDefault::EnableForSelf},
{mojom::FeaturePolicyFeature::kCamera, {mojom::FeaturePolicyFeature::kCamera,
FeaturePolicy::FeatureDefault::EnableForSelf}, FeaturePolicy::FeatureDefault::EnableForSelf},
{mojom::FeaturePolicyFeature::kDocumentCookie,
FeaturePolicy::FeatureDefault::EnableForAll},
{mojom::FeaturePolicyFeature::kDocumentDomain,
FeaturePolicy::FeatureDefault::EnableForAll},
{mojom::FeaturePolicyFeature::kDocumentWrite, {mojom::FeaturePolicyFeature::kDocumentWrite,
FeaturePolicy::FeatureDefault::EnableForAll}, FeaturePolicy::FeatureDefault::EnableForAll},
{mojom::FeaturePolicyFeature::kEncryptedMedia, {mojom::FeaturePolicyFeature::kEncryptedMedia,
...@@ -296,8 +292,6 @@ const FeaturePolicy::FeatureList& FeaturePolicy::GetDefaultFeatureList() { ...@@ -296,8 +292,6 @@ const FeaturePolicy::FeatureList& FeaturePolicy::GetDefaultFeatureList() {
FeaturePolicy::FeatureDefault::EnableForAll}, FeaturePolicy::FeatureDefault::EnableForAll},
{mojom::FeaturePolicyFeature::kSpeaker, {mojom::FeaturePolicyFeature::kSpeaker,
FeaturePolicy::FeatureDefault::EnableForSelf}, FeaturePolicy::FeatureDefault::EnableForSelf},
{mojom::FeaturePolicyFeature::kSyncScript,
FeaturePolicy::FeatureDefault::EnableForAll},
{mojom::FeaturePolicyFeature::kSyncXHR, {mojom::FeaturePolicyFeature::kSyncXHR,
FeaturePolicy::FeatureDefault::EnableForAll}, FeaturePolicy::FeatureDefault::EnableForAll},
{mojom::FeaturePolicyFeature::kUnsizedMedia, {mojom::FeaturePolicyFeature::kUnsizedMedia,
......
...@@ -138,35 +138,35 @@ ParsedFeaturePolicy ParseFeaturePolicy( ...@@ -138,35 +138,35 @@ ParsedFeaturePolicy ParseFeaturePolicy(
const FeatureNameMap& GetDefaultFeatureNameMap() { const FeatureNameMap& GetDefaultFeatureNameMap() {
DEFINE_STATIC_LOCAL(FeatureNameMap, default_feature_name_map, ()); DEFINE_STATIC_LOCAL(FeatureNameMap, default_feature_name_map, ());
if (default_feature_name_map.IsEmpty()) { if (default_feature_name_map.IsEmpty()) {
default_feature_name_map.Set("fullscreen", default_feature_name_map.Set("accelerometer",
mojom::FeaturePolicyFeature::kFullscreen); mojom::FeaturePolicyFeature::kAccelerometer);
default_feature_name_map.Set("payment", default_feature_name_map.Set(
mojom::FeaturePolicyFeature::kPayment); "ambient-light-sensor",
default_feature_name_map.Set("usb", mojom::FeaturePolicyFeature::kUsb); mojom::FeaturePolicyFeature::kAmbientLightSensor);
default_feature_name_map.Set("camera", default_feature_name_map.Set("camera",
mojom::FeaturePolicyFeature::kCamera); mojom::FeaturePolicyFeature::kCamera);
default_feature_name_map.Set("encrypted-media", default_feature_name_map.Set("encrypted-media",
mojom::FeaturePolicyFeature::kEncryptedMedia); mojom::FeaturePolicyFeature::kEncryptedMedia);
default_feature_name_map.Set("microphone", default_feature_name_map.Set("fullscreen",
mojom::FeaturePolicyFeature::kMicrophone); mojom::FeaturePolicyFeature::kFullscreen);
default_feature_name_map.Set("speaker",
mojom::FeaturePolicyFeature::kSpeaker);
default_feature_name_map.Set("geolocation", default_feature_name_map.Set("geolocation",
mojom::FeaturePolicyFeature::kGeolocation); mojom::FeaturePolicyFeature::kGeolocation);
default_feature_name_map.Set("gyroscope",
mojom::FeaturePolicyFeature::kGyroscope);
default_feature_name_map.Set("magnetometer",
mojom::FeaturePolicyFeature::kMagnetometer);
default_feature_name_map.Set("microphone",
mojom::FeaturePolicyFeature::kMicrophone);
default_feature_name_map.Set("midi", default_feature_name_map.Set("midi",
mojom::FeaturePolicyFeature::kMidiFeature); mojom::FeaturePolicyFeature::kMidiFeature);
default_feature_name_map.Set("payment",
mojom::FeaturePolicyFeature::kPayment);
default_feature_name_map.Set("speaker",
mojom::FeaturePolicyFeature::kSpeaker);
default_feature_name_map.Set("sync-xhr", default_feature_name_map.Set("sync-xhr",
mojom::FeaturePolicyFeature::kSyncXHR); mojom::FeaturePolicyFeature::kSyncXHR);
default_feature_name_map.Set("usb", mojom::FeaturePolicyFeature::kUsb);
default_feature_name_map.Set("vr", mojom::FeaturePolicyFeature::kWebVr); default_feature_name_map.Set("vr", mojom::FeaturePolicyFeature::kWebVr);
default_feature_name_map.Set("accelerometer",
mojom::FeaturePolicyFeature::kAccelerometer);
default_feature_name_map.Set(
"ambient-light-sensor",
mojom::FeaturePolicyFeature::kAmbientLightSensor);
default_feature_name_map.Set("gyroscope",
mojom::FeaturePolicyFeature::kGyroscope);
default_feature_name_map.Set("magnetometer",
mojom::FeaturePolicyFeature::kMagnetometer);
if (RuntimeEnabledFeatures::PictureInPictureAPIEnabled()) { if (RuntimeEnabledFeatures::PictureInPictureAPIEnabled()) {
default_feature_name_map.Set( default_feature_name_map.Set(
"picture-in-picture", mojom::FeaturePolicyFeature::kPictureInPicture); "picture-in-picture", mojom::FeaturePolicyFeature::kPictureInPicture);
...@@ -182,8 +182,6 @@ const FeatureNameMap& GetDefaultFeatureNameMap() { ...@@ -182,8 +182,6 @@ const FeatureNameMap& GetDefaultFeatureNameMap() {
default_feature_name_map.Set( default_feature_name_map.Set(
"max-downscaling-image", "max-downscaling-image",
mojom::FeaturePolicyFeature::kMaxDownscalingImage); mojom::FeaturePolicyFeature::kMaxDownscalingImage);
default_feature_name_map.Set("sync-script",
mojom::FeaturePolicyFeature::kSyncScript);
default_feature_name_map.Set("unsized-media", default_feature_name_map.Set("unsized-media",
mojom::FeaturePolicyFeature::kUnsizedMedia); mojom::FeaturePolicyFeature::kUnsizedMedia);
default_feature_name_map.Set( default_feature_name_map.Set(
...@@ -192,10 +190,6 @@ const FeatureNameMap& GetDefaultFeatureNameMap() { ...@@ -192,10 +190,6 @@ const FeatureNameMap& GetDefaultFeatureNameMap() {
if (RuntimeEnabledFeatures::FeaturePolicyExperimentalFeaturesEnabled()) { if (RuntimeEnabledFeatures::FeaturePolicyExperimentalFeaturesEnabled()) {
default_feature_name_map.Set("animations", default_feature_name_map.Set("animations",
mojom::FeaturePolicyFeature::kAnimations); mojom::FeaturePolicyFeature::kAnimations);
default_feature_name_map.Set(
"cookie", mojom::FeaturePolicyFeature::kDocumentCookie);
default_feature_name_map.Set(
"domain", mojom::FeaturePolicyFeature::kDocumentDomain);
} }
if (RuntimeEnabledFeatures::FeaturePolicyAutoplayFeatureEnabled()) { if (RuntimeEnabledFeatures::FeaturePolicyAutoplayFeatureEnabled()) {
default_feature_name_map.Set("autoplay", default_feature_name_map.Set("autoplay",
......
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