Commit 24620760 authored by Ian Clelland's avatar Ian Clelland Committed by Commit Bot

Move 'wake-lock' feature policy feature behind runtime flag

This ensures that the 'wake-lock' feature is not parsed in feature
policy directives unless the WakeLock runtime flag is enabled.

Bug: 925454
Change-Id: Ic8043be2f499295f4246d99866180c2aab222ad7
Reviewed-on: https://chromium-review.googlesource.com/c/1436201Reviewed-by: default avatarRick Byers <rbyers@chromium.org>
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626229}
parent b6146b46
......@@ -256,8 +256,6 @@ const FeatureNameMap& GetDefaultFeatureNameMap() {
ASSERT_ORIGIN_TRIAL(WebVR);
ASSERT_ORIGIN_TRIAL(WebXR);
default_feature_name_map.Set("vr", mojom::FeaturePolicyFeature::kWebVr);
default_feature_name_map.Set("wake-lock",
mojom::FeaturePolicyFeature::kWakeLock);
if (RuntimeEnabledFeatures::ExperimentalProductivityFeaturesEnabled()) {
default_feature_name_map.Set(
"layout-animations", mojom::FeaturePolicyFeature::kLayoutAnimations);
......@@ -303,6 +301,10 @@ const FeatureNameMap& GetDefaultFeatureNameMap() {
default_feature_name_map.Set("magnetometer",
mojom::FeaturePolicyFeature::kMagnetometer);
}
if (RuntimeEnabledFeatures::WakeLockEnabled()) {
default_feature_name_map.Set("wake-lock",
mojom::FeaturePolicyFeature::kWakeLock);
}
if (RuntimeEnabledFeatures::WebUSBEnabled()) {
default_feature_name_map.Set("usb", mojom::FeaturePolicyFeature::kUsb);
}
......
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