Commit cb2802bd authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Enable ephemeral Flash permissions by default.

Switch EnableEphemeralFlashPermission switch's default value to true.

Bug: 850062
Change-Id: I42cc3adb918f9c0e95d5ad17f08577d6149b3999
Reviewed-on: https://chromium-review.googlesource.com/1138238
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarMartin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575577}
parent 43df04fe
......@@ -364,9 +364,12 @@ TEST_F(PrefProviderTest, ResourceIdentifier) {
TestUtils::GetContentSetting(&pref_content_settings_provider, host,
host, CONTENT_SETTINGS_TYPE_PLUGINS,
resource1, false));
pref_content_settings_provider.SetWebsiteSetting(
pattern, pattern, CONTENT_SETTINGS_TYPE_PLUGINS, resource1,
new base::Value(CONTENT_SETTING_BLOCK));
std::unique_ptr<base::Value> value(new base::Value(CONTENT_SETTING_BLOCK));
if (pref_content_settings_provider.SetWebsiteSetting(
pattern, pattern, CONTENT_SETTINGS_TYPE_PLUGINS, resource1,
value.get())) {
value.release();
}
bool flash_is_ephemeral =
ContentSettingsRegistry::GetInstance()
......@@ -501,12 +504,20 @@ TEST_F(PrefProviderTest, ClearAllContentSettingsRules) {
ResourceIdentifier(), value->DeepCopy());
#if BUILDFLAG(ENABLE_PLUGINS)
// Non-empty pattern, plugins, non-empty resource identifier.
provider.SetWebsiteSetting(pattern, wildcard, CONTENT_SETTINGS_TYPE_PLUGINS,
res_id, value->DeepCopy());
std::unique_ptr<base::Value> value_copy(value->DeepCopy());
if (provider.SetWebsiteSetting(pattern, wildcard,
CONTENT_SETTINGS_TYPE_PLUGINS, res_id,
value_copy.get())) {
value_copy.release();
}
// Empty pattern, plugins, non-empty resource identifier.
provider.SetWebsiteSetting(wildcard, wildcard, CONTENT_SETTINGS_TYPE_PLUGINS,
res_id, value->DeepCopy());
value_copy.reset(value->DeepCopy());
if (provider.SetWebsiteSetting(wildcard, wildcard,
CONTENT_SETTINGS_TYPE_PLUGINS, res_id,
value_copy.get())) {
value_copy.release();
}
#endif
// Non-empty pattern, syncable, empty resource identifier.
provider.SetWebsiteSetting(pattern, wildcard, CONTENT_SETTINGS_TYPE_COOKIES,
......
......@@ -12,7 +12,7 @@ namespace features {
// Makes Flash plugin permissions persistent only through the current session.
const base::Feature kEnableEphemeralFlashPermission{
"EnableEphemeralFlashPermission", base::FEATURE_DISABLED_BY_DEFAULT};
"EnableEphemeralFlashPermission", base::FEATURE_ENABLED_BY_DEFAULT};
} // namespace features
} // namespace content_settings
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