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

Autoplay: change feature flags associated with string changes.

Bug: 905128
Change-Id: I590981ee93a645cef51586c880b5225ab03f2c29
Reviewed-on: https://chromium-review.googlesource.com/c/1335028Reviewed-by: default avatarBecca Hughes <beccahughes@chromium.org>
Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608573}
parent 8c76e302
...@@ -117,7 +117,7 @@ Polymer({ ...@@ -117,7 +117,7 @@ Polymer({
*/ */
useCustomSoundLabels_: function(category) { useCustomSoundLabels_: function(category) {
return category == settings.ContentSettingsTypes.SOUND && return category == settings.ContentSettingsTypes.SOUND &&
loadTimeData.getBoolean('enableBlockAutoplayContentSetting'); loadTimeData.getBoolean('enableAutoplayWhitelistContentSetting');
}, },
/** /**
......
...@@ -335,7 +335,7 @@ base::string16 PageInfoUI::PermissionActionToUIString( ...@@ -335,7 +335,7 @@ base::string16 PageInfoUI::PermissionActionToUIString(
if (setting == CONTENT_SETTING_DEFAULT) { if (setting == CONTENT_SETTING_DEFAULT) {
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
if (type == CONTENT_SETTINGS_TYPE_SOUND && if (type == CONTENT_SETTINGS_TYPE_SOUND &&
base::FeatureList::IsEnabled(media::kAutoplayDisableSettings)) { base::FeatureList::IsEnabled(media::kAutoplayWhitelistSettings)) {
// If the block autoplay enabled preference is enabled and the // If the block autoplay enabled preference is enabled and the
// sound default setting is ALLOW, we will return a custom string // sound default setting is ALLOW, we will return a custom string
// indicating that Chrome is controlling autoplay and sound // indicating that Chrome is controlling autoplay and sound
...@@ -359,7 +359,7 @@ base::string16 PageInfoUI::PermissionActionToUIString( ...@@ -359,7 +359,7 @@ base::string16 PageInfoUI::PermissionActionToUIString(
case content_settings::SETTING_SOURCE_EXTENSION: case content_settings::SETTING_SOURCE_EXTENSION:
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
if (type == CONTENT_SETTINGS_TYPE_SOUND && if (type == CONTENT_SETTINGS_TYPE_SOUND &&
base::FeatureList::IsEnabled(media::kAutoplayDisableSettings)) { base::FeatureList::IsEnabled(media::kAutoplayWhitelistSettings)) {
button_text_ids = kSoundPermissionButtonTextIDUserManaged; button_text_ids = kSoundPermissionButtonTextIDUserManaged;
break; break;
} }
......
...@@ -2555,6 +2555,10 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source, ...@@ -2555,6 +2555,10 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
"enableBlockAutoplayContentSetting", "enableBlockAutoplayContentSetting",
base::FeatureList::IsEnabled(media::kAutoplayDisableSettings)); base::FeatureList::IsEnabled(media::kAutoplayDisableSettings));
html_source->AddBoolean(
"enableAutoplayWhitelistContentSetting",
base::FeatureList::IsEnabled(media::kAutoplayWhitelistSettings));
html_source->AddBoolean( html_source->AddBoolean(
"enableClipboardContentSetting", "enableClipboardContentSetting",
base::FeatureList::IsEnabled(features::kClipboardContentSetting)); base::FeatureList::IsEnabled(features::kClipboardContentSetting));
......
...@@ -28,7 +28,7 @@ suite('SiteDetailsPermission', function() { ...@@ -28,7 +28,7 @@ suite('SiteDetailsPermission', function() {
settings.ContentSettingsTypes.CAMERA, settings.ContentSettingsTypes.CAMERA,
[test_util.createRawSiteException('https://www.example.com')])]); [test_util.createRawSiteException('https://www.example.com')])]);
loadTimeData.overrideValues({enableBlockAutoplayContentSetting: true}); loadTimeData.overrideValues({enableAutoplayWhitelistContentSetting: true});
browserProxy = new TestSiteSettingsPrefsBrowserProxy(); browserProxy = new TestSiteSettingsPrefsBrowserProxy();
settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy; settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy;
......
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