Commit 22b25dd3 authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

[WebNFC] Enable feature flag by default for Origin Trial

For the WebNFC Origin Trial the feature flag needs to be enabled by
default and configured as "disable only" in runtime_features.cc so that
it can still be used as a kill switch but will not enable the feature
on sites which don't have a valid Origin Trial token.

Bug: 1035048
Change-Id: I139a79dd0f93013bc59d5023017b49c820532fb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2052198
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743309}
parent 005cbbb6
...@@ -99,11 +99,6 @@ void SetRuntimeFeatureDefaultsForPlatform( ...@@ -99,11 +99,6 @@ void SetRuntimeFeatureDefaultsForPlatform(
WebRuntimeFeatures::EnableMediaSession(false); WebRuntimeFeatures::EnableMediaSession(false);
#endif #endif
#if defined(OS_ANDROID)
WebRuntimeFeatures::EnableWebNfc(
base::FeatureList::IsEnabled(features::kWebNfc));
#endif
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
// APIs for Web Authentication are not available prior to N. // APIs for Web Authentication are not available prior to N.
WebRuntimeFeatures::EnableWebAuth( WebRuntimeFeatures::EnableWebAuth(
...@@ -310,6 +305,10 @@ void SetRuntimeFeaturesFromChromiumFeatures() { ...@@ -310,6 +305,10 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
features::kBrowserVerifiedUserActivationKeyboard, kEnableOnly}, features::kBrowserVerifiedUserActivationKeyboard, kEnableOnly},
{wf::EnableBrowserVerifiedUserActivationMouse, {wf::EnableBrowserVerifiedUserActivationMouse,
features::kBrowserVerifiedUserActivationMouse, kEnableOnly}, features::kBrowserVerifiedUserActivationMouse, kEnableOnly},
#if defined(OS_ANDROID)
{wf::EnableWebNfc,
features::kWebNfc, kDisableOnly},
#endif
}; };
for (const auto& mapping : blinkFeatureToBaseFeatureMapping) { for (const auto& mapping : blinkFeatureToBaseFeatureMapping) {
const bool featureEnabled = const bool featureEnabled =
......
...@@ -832,9 +832,10 @@ const base::Feature kWarmUpNetworkProcess{"WarmUpNetworkProcess", ...@@ -832,9 +832,10 @@ const base::Feature kWarmUpNetworkProcess{"WarmUpNetworkProcess",
const base::Feature kForce60HzRefreshRate{"Force60HzRefreshRate", const base::Feature kForce60HzRefreshRate{"Force60HzRefreshRate",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
// Controls whether the WebNFC API is enabled: // Kill switch for the WebNFC feature. This feature can be enabled for all sites
// https://w3c.github.io/web-nfc/ // using the kEnableExperimentalWebPlatformFeatures flag or by a particular site
const base::Feature kWebNfc{"WebNFC", base::FEATURE_DISABLED_BY_DEFAULT}; // if it includes an Origin Trial key. https://w3c.github.io/web-nfc/
const base::Feature kWebNfc{"WebNFC", base::FEATURE_ENABLED_BY_DEFAULT};
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
......
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