Commit c0688ebb authored by Mounir Lamouri's avatar Mounir Lamouri Committed by Commit Bot

Remove kAutoplayWhitelistSettings base::Feature.

The feature is enabled by default and the flag is no longer required.

Change-Id: Ifd7825e03edc2b166209f232bd1b5bd40a7f062a
Fixed: 1112537
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2538352Reviewed-by: default avatardpapad <dpapad@chromium.org>
Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828367}
parent c0b6cc07
......@@ -17,7 +17,6 @@
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/common/url_constants.h"
#include "media/base/media_switches.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/mojom/autoplay/autoplay.mojom.h"
......@@ -52,9 +51,6 @@ void SoundContentSettingObserver::ReadyToCommitNavigation(
if (navigation_handle->IsSameDocument())
return;
if (!base::FeatureList::IsEnabled(media::kAutoplayWhitelistSettings))
return;
GURL url = navigation_handle->IsInMainFrame()
? navigation_handle->GetURL()
: navigation_handle->GetWebContents()->GetLastCommittedURL();
......
......@@ -37,7 +37,6 @@ struct MediaEngagementConfig {
bool feature_preload_data;
bool feature_https_only;
bool feature_autoplay_disable_settings;
bool feature_autoplay_whitelist_settings;
bool pref_disable_unified_autoplay;
bool has_custom_autoplay_policy;
string autoplay_policy;
......
......@@ -424,9 +424,8 @@ IN_PROC_BROWSER_TEST_F(UnifiedAutoplayBrowserTest,
class UnifiedAutoplaySettingBrowserTest : public UnifiedAutoplayBrowserTest {
public:
UnifiedAutoplaySettingBrowserTest() {
scoped_feature_list_.InitWithFeatures(
{media::kAutoplayDisableSettings, media::kAutoplayWhitelistSettings},
{});
scoped_feature_list_.InitWithFeatures({media::kAutoplayDisableSettings},
{});
}
~UnifiedAutoplaySettingBrowserTest() override = default;
......
......@@ -27,9 +27,8 @@ class UnifiedAutoplaySoundSettingsTest
~UnifiedAutoplaySoundSettingsTest() override = default;
void SetUp() override {
scoped_feature_list_.InitWithFeatures(
{media::kAutoplayDisableSettings, media::kAutoplayWhitelistSettings},
{});
scoped_feature_list_.InitWithFeatures({media::kAutoplayDisableSettings},
{});
ChromeRenderViewHostTestHarness::SetUp();
SoundContentSettingObserver::CreateForWebContents(web_contents());
......@@ -100,8 +99,7 @@ TEST_F(UnifiedAutoplaySoundSettingsTest, ContentSetting_Block) {
TEST_F(UnifiedAutoplaySoundSettingsTest, Feature_DisabledNoop) {
// Explicitly disable the feature.
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitWithFeatures(
{}, {media::kAutoplayDisableSettings, media::kAutoplayWhitelistSettings});
scoped_feature_list.InitWithFeatures({}, {media::kAutoplayDisableSettings});
SetAutoplayPrefValue(false);
EXPECT_FALSE(ShouldBlockAutoplay());
......
......@@ -135,9 +135,6 @@ function renderConfigTable(config) {
configTableBody.appendChild(createConfigRow(
'Autoplay disable settings',
formatFeatureFlag(config.featureAutoplayDisableSettings)));
configTableBody.appendChild(createConfigRow(
'Autoplay whitelist settings',
formatFeatureFlag(config.featureAutoplayWhitelistSettings)));
configTableBody.appendChild(createConfigRow(
'Unified autoplay (preference)',
formatFeatureFlag(config.prefDisableUnifiedAutoplay)));
......
......@@ -132,8 +132,7 @@ Polymer({
* @private
*/
useCustomSoundLabels_(category) {
return category === ContentSettingsTypes.SOUND &&
loadTimeData.getBoolean('enableAutoplayWhitelistContentSetting');
return category === ContentSettingsTypes.SOUND;
},
/**
......
......@@ -1552,9 +1552,8 @@ class UnifiedAutoplaySoundSettingsPageInfoTest
~UnifiedAutoplaySoundSettingsPageInfoTest() override = default;
void SetUp() override {
scoped_feature_list_.InitWithFeatures(
{media::kAutoplayDisableSettings, media::kAutoplayWhitelistSettings},
{});
scoped_feature_list_.InitWithFeatures({media::kAutoplayDisableSettings},
{});
ChromeRenderViewHostTestHarness::SetUp();
}
......
......@@ -84,7 +84,6 @@ class MediaEngagementScoreDetailsProviderImpl
base::FeatureList::IsEnabled(media::kPreloadMediaEngagementData),
base::FeatureList::IsEnabled(media::kMediaEngagementHTTPSOnly),
base::FeatureList::IsEnabled(media::kAutoplayDisableSettings),
base::FeatureList::IsEnabled(media::kAutoplayWhitelistSettings),
GetBlockAutoplayPref(),
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAutoplayPolicy),
......
......@@ -2218,10 +2218,6 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
"enableBlockAutoplayContentSetting",
base::FeatureList::IsEnabled(media::kAutoplayDisableSettings));
html_source->AddBoolean(
"enableAutoplayWhitelistContentSetting",
base::FeatureList::IsEnabled(media::kAutoplayWhitelistSettings));
html_source->AddBoolean(
"enablePaymentHandlerContentSetting",
base::FeatureList::IsEnabled(features::kServiceWorkerPaymentApps));
......
......@@ -3,7 +3,6 @@
// found in the LICENSE file.
// clang-format off
import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js';
import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
import {ContentSetting,ContentSettingsTypes,SiteSettingSource,SiteSettingsPrefsBrowserProxyImpl} from 'chrome://settings/lazy_load.js';
import {TestSiteSettingsPrefsBrowserProxy} from 'chrome://test/settings/test_site_settings_prefs_browser_proxy.js';
......@@ -41,8 +40,6 @@ suite('SiteDetailsPermission', function() {
ContentSettingsTypes.CAMERA,
[createRawSiteException('https://www.example.com')])]);
loadTimeData.overrideValues({enableAutoplayWhitelistContentSetting: true});
browserProxy = new TestSiteSettingsPrefsBrowserProxy();
SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy;
PolymerTest.clearBody();
......
......@@ -30,7 +30,6 @@
#if defined(OS_ANDROID)
#include "components/resources/android/theme_resources.h"
#else
#include "media/base/media_switches.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/paint_vector_icon.h"
......@@ -421,8 +420,7 @@ base::string16 PageInfoUI::PermissionActionToUIString(
case content_settings::SETTING_SOURCE_USER:
if (setting == CONTENT_SETTING_DEFAULT) {
#if !defined(OS_ANDROID)
if (type == ContentSettingsType::SOUND &&
base::FeatureList::IsEnabled(media::kAutoplayWhitelistSettings)) {
if (type == ContentSettingsType::SOUND) {
// If the block autoplay enabled preference is enabled and the
// sound default setting is ALLOW, we will return a custom string
// indicating that Chrome is controlling autoplay and sound
......@@ -444,8 +442,7 @@ base::string16 PageInfoUI::PermissionActionToUIString(
case content_settings::SETTING_SOURCE_POLICY:
case content_settings::SETTING_SOURCE_EXTENSION:
#if !defined(OS_ANDROID)
if (type == ContentSettingsType::SOUND &&
base::FeatureList::IsEnabled(media::kAutoplayWhitelistSettings)) {
if (type == ContentSettingsType::SOUND) {
button_text_ids = kSoundPermissionButtonTextIDUserManaged;
break;
}
......
......@@ -540,10 +540,6 @@ const base::Feature kAutoplayIgnoreWebAudio{"AutoplayIgnoreWebAudio",
const base::Feature kAutoplayDisableSettings{"AutoplayDisableSettings",
base::FEATURE_DISABLED_BY_DEFAULT};
// Whether we should allow autoplay whitelisting via sounds settings.
const base::Feature kAutoplayWhitelistSettings{
"AutoplayWhitelistSettings", base::FEATURE_ENABLED_BY_DEFAULT};
#if defined(OS_ANDROID)
// Should we allow video playback to use an overlay if it's not needed for
// security? Normally, we'd always want to allow this, except as part of the
......
......@@ -105,7 +105,6 @@ MEDIA_EXPORT extern const base::Feature kAudioFocusDuckFlash;
MEDIA_EXPORT extern const base::Feature kAudioFocusLossSuspendMediaSession;
MEDIA_EXPORT extern const base::Feature kAutoplayIgnoreWebAudio;
MEDIA_EXPORT extern const base::Feature kAutoplayDisableSettings;
MEDIA_EXPORT extern const base::Feature kAutoplayWhitelistSettings;
MEDIA_EXPORT extern const base::Feature kBackgroundVideoPauseOptimization;
MEDIA_EXPORT extern const base::Feature kBresenhamCadence;
MEDIA_EXPORT extern const base::Feature kCdmHostVerification;
......
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