Commit 1eab052d authored by Rodney Ding's avatar Rodney Ding Committed by Commit Bot

Remove flags & switches for disabling origin trial framework

Bug: 951807
Change-Id: Iea14dadc17791f222fb3206eff67d9293e4285e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764318Reviewed-by: default avatarJason Chase <chasej@chromium.org>
Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Rodney Ding <rodneyding@google.com>
Cr-Commit-Position: refs/heads/master@{#690075}
parent 3e80dd3c
...@@ -53,7 +53,7 @@ ChromeOriginTrialPolicy::ChromeOriginTrialPolicy() ...@@ -53,7 +53,7 @@ ChromeOriginTrialPolicy::ChromeOriginTrialPolicy()
ChromeOriginTrialPolicy::~ChromeOriginTrialPolicy() {} ChromeOriginTrialPolicy::~ChromeOriginTrialPolicy() {}
bool ChromeOriginTrialPolicy::IsOriginTrialsSupported() const { bool ChromeOriginTrialPolicy::IsOriginTrialsSupported() const {
return base::FeatureList::IsEnabled(features::kOriginTrials); return true;
} }
base::StringPiece ChromeOriginTrialPolicy::GetPublicKey() const { base::StringPiece ChromeOriginTrialPolicy::GetPublicKey() const {
......
...@@ -58,8 +58,6 @@ void SetRuntimeFeatureDefaultsForPlatform() { ...@@ -58,8 +58,6 @@ void SetRuntimeFeatureDefaultsForPlatform() {
void SetIndividualRuntimeFeatures( void SetIndividualRuntimeFeatures(
const base::CommandLine& command_line, const base::CommandLine& command_line,
bool enable_experimental_web_platform_features) { bool enable_experimental_web_platform_features) {
WebRuntimeFeatures::EnableOriginTrials(
base::FeatureList::IsEnabled(features::kOriginTrials));
if (!base::FeatureList::IsEnabled(features::kWebUsb)) if (!base::FeatureList::IsEnabled(features::kWebUsb))
WebRuntimeFeatures::EnableWebUsb(false); WebRuntimeFeatures::EnableWebUsb(false);
......
...@@ -306,10 +306,6 @@ const base::Feature kNotificationTriggers{"NotificationTriggers", ...@@ -306,10 +306,6 @@ const base::Feature kNotificationTriggers{"NotificationTriggers",
const base::Feature kOriginPolicy{"OriginPolicy", const base::Feature kOriginPolicy{"OriginPolicy",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
// Origin Trials for controlling access to feature/API experiments.
const base::Feature kOriginTrials{"OriginTrials",
base::FEATURE_ENABLED_BY_DEFAULT};
// History navigation in response to horizontal overscroll (aka gesture-nav). // History navigation in response to horizontal overscroll (aka gesture-nav).
const base::Feature kOverscrollHistoryNavigation { const base::Feature kOverscrollHistoryNavigation {
"OverscrollHistoryNavigation", "OverscrollHistoryNavigation",
......
...@@ -73,7 +73,6 @@ CONTENT_EXPORT extern const base::Feature kNetworkServiceInProcess; ...@@ -73,7 +73,6 @@ CONTENT_EXPORT extern const base::Feature kNetworkServiceInProcess;
CONTENT_EXPORT extern const base::Feature kNotificationContentImage; CONTENT_EXPORT extern const base::Feature kNotificationContentImage;
CONTENT_EXPORT extern const base::Feature kNotificationTriggers; CONTENT_EXPORT extern const base::Feature kNotificationTriggers;
CONTENT_EXPORT extern const base::Feature kOriginPolicy; CONTENT_EXPORT extern const base::Feature kOriginPolicy;
CONTENT_EXPORT extern const base::Feature kOriginTrials;
CONTENT_EXPORT extern const base::Feature kOverscrollHistoryNavigation; CONTENT_EXPORT extern const base::Feature kOverscrollHistoryNavigation;
CONTENT_EXPORT extern const base::Feature kPassiveDocumentEventListeners; CONTENT_EXPORT extern const base::Feature kPassiveDocumentEventListeners;
CONTENT_EXPORT extern const base::Feature kPassiveDocumentWheelEventListeners; CONTENT_EXPORT extern const base::Feature kPassiveDocumentWheelEventListeners;
......
...@@ -33,7 +33,7 @@ ShellOriginTrialPolicy::ShellOriginTrialPolicy() ...@@ -33,7 +33,7 @@ ShellOriginTrialPolicy::ShellOriginTrialPolicy()
ShellOriginTrialPolicy::~ShellOriginTrialPolicy() {} ShellOriginTrialPolicy::~ShellOriginTrialPolicy() {}
bool ShellOriginTrialPolicy::IsOriginTrialsSupported() const { bool ShellOriginTrialPolicy::IsOriginTrialsSupported() const {
return base::FeatureList::IsEnabled(features::kOriginTrials); return true;
} }
base::StringPiece ShellOriginTrialPolicy::GetPublicKey() const { base::StringPiece ShellOriginTrialPolicy::GetPublicKey() const {
......
...@@ -70,9 +70,6 @@ class WebRuntimeFeatures { ...@@ -70,9 +70,6 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableCompositorTouchAction(bool); BLINK_PLATFORM_EXPORT static void EnableCompositorTouchAction(bool);
BLINK_PLATFORM_EXPORT static void EnableOriginTrials(bool);
BLINK_PLATFORM_EXPORT static bool IsOriginTrialsEnabled();
BLINK_PLATFORM_EXPORT static void EnableAccelerated2dCanvas(bool); BLINK_PLATFORM_EXPORT static void EnableAccelerated2dCanvas(bool);
BLINK_PLATFORM_EXPORT static void EnableAccessibilityObjectModel(bool); BLINK_PLATFORM_EXPORT static void EnableAccessibilityObjectModel(bool);
BLINK_PLATFORM_EXPORT static void EnableAdTagging(bool); BLINK_PLATFORM_EXPORT static void EnableAdTagging(bool);
......
...@@ -272,8 +272,6 @@ void OriginTrialContext::AddFeature(OriginTrialFeature feature) { ...@@ -272,8 +272,6 @@ void OriginTrialContext::AddFeature(OriginTrialFeature feature) {
} }
bool OriginTrialContext::IsFeatureEnabled(OriginTrialFeature feature) const { bool OriginTrialContext::IsFeatureEnabled(OriginTrialFeature feature) const {
if (!RuntimeEnabledFeatures::OriginTrialsEnabled())
return false;
if (enabled_features_.Contains(feature) || if (enabled_features_.Contains(feature) ||
navigation_activated_features_.Contains(feature)) { navigation_activated_features_.Contains(feature)) {
...@@ -299,9 +297,6 @@ bool OriginTrialContext::IsFeatureEnabled(OriginTrialFeature feature) const { ...@@ -299,9 +297,6 @@ bool OriginTrialContext::IsFeatureEnabled(OriginTrialFeature feature) const {
bool OriginTrialContext::IsNavigationFeatureActivated( bool OriginTrialContext::IsNavigationFeatureActivated(
OriginTrialFeature feature) const { OriginTrialFeature feature) const {
if (!RuntimeEnabledFeatures::OriginTrialsEnabled())
return false;
return navigation_activated_features_.Contains(feature); return navigation_activated_features_.Contains(feature);
} }
......
...@@ -71,12 +71,10 @@ class MockTokenValidator : public TrialTokenValidator { ...@@ -71,12 +71,10 @@ class MockTokenValidator : public TrialTokenValidator {
} // namespace } // namespace
class OriginTrialContextTest : public testing::Test, class OriginTrialContextTest : public testing::Test{
private ScopedOriginTrialsForTest {
protected: protected:
OriginTrialContextTest() OriginTrialContextTest()
: ScopedOriginTrialsForTest(true), : token_validator_(new MockTokenValidator),
token_validator_(new MockTokenValidator),
execution_context_(MakeGarbageCollected<NullExecutionContext>( execution_context_(MakeGarbageCollected<NullExecutionContext>(
MakeGarbageCollected<OriginTrialContext>( MakeGarbageCollected<OriginTrialContext>(
std::unique_ptr<MockTokenValidator>(token_validator_)))), std::unique_ptr<MockTokenValidator>(token_validator_)))),
......
...@@ -296,14 +296,6 @@ void WebRuntimeFeatures::EnableOrientationEvent(bool enable) { ...@@ -296,14 +296,6 @@ void WebRuntimeFeatures::EnableOrientationEvent(bool enable) {
RuntimeEnabledFeatures::SetOrientationEventEnabled(enable); RuntimeEnabledFeatures::SetOrientationEventEnabled(enable);
} }
void WebRuntimeFeatures::EnableOriginTrials(bool enable) {
RuntimeEnabledFeatures::SetOriginTrialsEnabled(enable);
}
bool WebRuntimeFeatures::IsOriginTrialsEnabled() {
return RuntimeEnabledFeatures::OriginTrialsEnabled();
}
void WebRuntimeFeatures::EnableOverflowIconsForMediaControls(bool enable) { void WebRuntimeFeatures::EnableOverflowIconsForMediaControls(bool enable) {
RuntimeEnabledFeatures::SetOverflowIconsForMediaControlsEnabled(enable); RuntimeEnabledFeatures::SetOverflowIconsForMediaControlsEnabled(enable);
} }
......
...@@ -1096,10 +1096,7 @@ ...@@ -1096,10 +1096,7 @@
name: "OrientationEvent", name: "OrientationEvent",
status: {"Android": "stable"}, status: {"Android": "stable"},
}, },
{
name: "OriginTrials",
status: "stable",
},
// Define a sample API for testing integration with the Origin Trials // Define a sample API for testing integration with the Origin Trials
// Framework. The sample API is used in both unit and web tests for the // Framework. The sample API is used in both unit and web tests for the
// Origin Trials Framework. Do not change this flag to stable, as it exists // Origin Trials Framework. Do not change this flag to stable, as it exists
......
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