Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Flash default to ContentSettingsRegistry #700

Merged
merged 1 commit into from
Oct 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ void ContentSettingsRegistry::BraveInit() {
ContentSettingsInfo::INHERIT_IN_INCOGNITO,
ContentSettingsInfo::PERSISTENT);

// Change plugins default to CONTENT_SETTING_BLOCK
content_settings_info_.erase(CONTENT_SETTINGS_TYPE_PLUGINS);
website_settings_registry_->UnRegister(CONTENT_SETTINGS_TYPE_PLUGINS);
Register(
CONTENT_SETTINGS_TYPE_PLUGINS, "plugins",
CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::SYNCABLE,
WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme),
ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
CONTENT_SETTING_ASK,
CONTENT_SETTING_DETECT_IMPORTANT_CONTENT),
WebsiteSettingsInfo::SINGLE_ORIGIN_WITH_EMBEDDED_EXCEPTIONS_SCOPE,
WebsiteSettingsRegistry::DESKTOP,
ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE,
base::FeatureList::IsEnabled(features::kEnableEphemeralFlashPermission)
? ContentSettingsInfo::EPHEMERAL
: ContentSettingsInfo::PERSISTENT);
}

} // namespace content_settings
2 changes: 0 additions & 2 deletions components/content_settings/core/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ source_set("browser") {
"brave_content_settings_pref_provider.h",
"brave_cookie_settings.cc",
"brave_cookie_settings.h",
"brave_host_content_settings_map.cc",
"brave_host_content_settings_map.h",
]

deps = [
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ test("brave_unit_tests") {
"//brave/common/tor/tor_test_constants.h",
"//brave/components/brave_shields/browser/ad_block_regional_service_unittest.cc",
"//brave/components/brave_webtorrent/browser/net/brave_torrent_redirect_network_delegate_helper_unittest.cc",
"//brave/components/content_settings/core/browser/brave_host_content_settings_map_unittest.cc",
"//chrome/common/importer/mock_importer_bridge.cc",
"//chrome/common/importer/mock_importer_bridge.h",
"../browser/importer/chrome_profile_lock_unittest.cc",
Expand Down