Commit 0e0dd986 authored by Illia Klimov's avatar Illia Klimov Committed by Commit Bot

Remove ability for extensions to set/get/clear flash content settings.

Bug: 1142548
Change-Id: Id0275f770fb2ffa2070438a1d16581d725937fa3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517492Reviewed-by: default avatarFinnur Thorarinsson <finnur@chromium.org>
Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
Commit-Queue: Illia Klimov <elklm@google.com>
Auto-Submit: Illia Klimov <elklm@google.com>
Cr-Commit-Position: refs/heads/master@{#825399}
parent ca7574a5
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/feature_list.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/task/post_task.h" #include "base/task/post_task.h"
...@@ -33,8 +32,6 @@ ...@@ -33,8 +32,6 @@
#include "components/content_settings/core/browser/cookie_settings.h" #include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/features.h"
#include "components/permissions/features.h"
#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/common/webplugininfo.h" #include "content/public/common/webplugininfo.h"
...@@ -84,6 +81,12 @@ ContentSettingsContentSettingClearFunction::Run() { ...@@ -84,6 +81,12 @@ ContentSettingsContentSettingClearFunction::Run() {
std::unique_ptr<Clear::Params> params(Clear::Params::Create(*args_)); std::unique_ptr<Clear::Params> params(Clear::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get()); EXTENSION_FUNCTION_VALIDATE(params.get());
if (content_type == ContentSettingsType::PLUGINS) {
return RespondNow(
Error(content_settings_api_constants::
kSettingPluginContentSettingsClearIsDisallowed));
}
ExtensionPrefsScope scope = kExtensionPrefsScopeRegular; ExtensionPrefsScope scope = kExtensionPrefsScopeRegular;
bool incognito = false; bool incognito = false;
if (params->details.scope == if (params->details.scope ==
...@@ -118,6 +121,11 @@ ContentSettingsContentSettingGetFunction::Run() { ...@@ -118,6 +121,11 @@ ContentSettingsContentSettingGetFunction::Run() {
std::unique_ptr<Get::Params> params(Get::Params::Create(*args_)); std::unique_ptr<Get::Params> params(Get::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get()); EXTENSION_FUNCTION_VALIDATE(params.get());
if (content_type == ContentSettingsType::PLUGINS) {
return RespondNow(Error(content_settings_api_constants::
kSettingPluginContentSettingsGetIsDisallowed));
}
GURL primary_url(params->details.primary_url); GURL primary_url(params->details.primary_url);
if (!primary_url.is_valid()) { if (!primary_url.is_valid()) {
return RespondNow(Error(content_settings_api_constants::kInvalidUrlError, return RespondNow(Error(content_settings_api_constants::kInvalidUrlError,
...@@ -301,18 +309,8 @@ ContentSettingsContentSettingSetFunction::Run() { ...@@ -301,18 +309,8 @@ ContentSettingsContentSettingSetFunction::Run() {
} }
if (content_type == ContentSettingsType::PLUGINS) { if (content_type == ContentSettingsType::PLUGINS) {
if (base::FeatureList::IsEnabled(
content_settings::kDisallowExtensionsToSetPluginContentSettings)) {
return RespondNow(Error(content_settings_api_constants:: return RespondNow(Error(content_settings_api_constants::
kSettingPluginContentSettingsIsDisallowed)); kSettingPluginContentSettingsIsDisallowed));
}
if (base::FeatureList::IsEnabled(
content_settings::kDisallowWildcardsInPluginContentSettings) &&
primary_pattern.HasHostWildcards()) {
WriteToConsole(blink::mojom::ConsoleMessageLevel::kError,
content_settings_api_constants::
kWildcardPatternsForPluginsDisallowed);
}
} }
scoped_refptr<ContentSettingsStore> store = scoped_refptr<ContentSettingsStore> store =
...@@ -334,38 +332,12 @@ ContentSettingsContentSettingGetResourceIdentifiersFunction::Run() { ...@@ -334,38 +332,12 @@ ContentSettingsContentSettingGetResourceIdentifiersFunction::Run() {
} }
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
content::PluginService::GetInstance()->GetPlugins(base::BindOnce( return RespondNow(
&ContentSettingsContentSettingGetResourceIdentifiersFunction:: Error(content_settings_api_constants::
OnGotPlugins, kSettingPluginContentSettingsResourceIdentifierIsDisallowed));
this));
#endif #endif
return RespondLater(); return RespondLater();
} }
#if BUILDFLAG(ENABLE_PLUGINS)
void ContentSettingsContentSettingGetResourceIdentifiersFunction::OnGotPlugins(
const std::vector<content::WebPluginInfo>& plugins) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
PluginFinder* finder = PluginFinder::GetInstance();
std::set<std::string> group_identifiers;
std::unique_ptr<base::ListValue> list(new base::ListValue());
for (auto it = plugins.cbegin(); it != plugins.cend(); ++it) {
std::unique_ptr<PluginMetadata> plugin_metadata(
finder->GetPluginMetadata(*it));
const std::string& group_identifier = plugin_metadata->identifier();
if (group_identifiers.find(group_identifier) != group_identifiers.end())
continue;
group_identifiers.insert(group_identifier);
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString(content_settings_api_constants::kIdKey, group_identifier);
dict->SetString(content_settings_api_constants::kDescriptionKey,
plugin_metadata->name());
list->Append(std::move(dict));
}
Respond(OneArgument(base::Value::FromUniquePtrValue(std::move(list))));
}
#endif // BUILDFLAG(ENABLE_PLUGINS)
} // namespace extensions } // namespace extensions
...@@ -28,6 +28,13 @@ const char kWildcardPatternsForPluginsDisallowed[] = ...@@ -28,6 +28,13 @@ const char kWildcardPatternsForPluginsDisallowed[] =
"supported in `primaryPattern` for `plugins`."; "supported in `primaryPattern` for `plugins`.";
const char kSettingPluginContentSettingsIsDisallowed[] = const char kSettingPluginContentSettingsIsDisallowed[] =
"`chrome.contentSettings.plugins.set()` API is no longer supported."; "`chrome.contentSettings.plugins.set()` API is no longer supported.";
const char kSettingPluginContentSettingsResourceIdentifierIsDisallowed[] =
"`chrome.contentSettings.plugins.getResourceIdentifiers()` API is no "
"longer supported.";
const char kSettingPluginContentSettingsGetIsDisallowed[] =
"`chrome.contentSettings.plugins.get()` API is no longer supported.";
const char kSettingPluginContentSettingsClearIsDisallowed[] =
"`chrome.contentSettings.plugins.clear()` API is no longer supported.";
} // namespace content_settings_api_constants } // namespace content_settings_api_constants
} // namespace extensions } // namespace extensions
...@@ -25,6 +25,9 @@ extern const char kIncognitoSessionOnlyError[]; ...@@ -25,6 +25,9 @@ extern const char kIncognitoSessionOnlyError[];
extern const char kInvalidUrlError[]; extern const char kInvalidUrlError[];
extern const char kWildcardPatternsForPluginsDisallowed[]; extern const char kWildcardPatternsForPluginsDisallowed[];
extern const char kSettingPluginContentSettingsIsDisallowed[]; extern const char kSettingPluginContentSettingsIsDisallowed[];
extern const char kSettingPluginContentSettingsResourceIdentifierIsDisallowed[];
extern const char kSettingPluginContentSettingsGetIsDisallowed[];
extern const char kSettingPluginContentSettingsClearIsDisallowed[];
} // namespace content_settings_api_constants } // namespace content_settings_api_constants
} // namespace extensions } // namespace extensions
......
...@@ -94,7 +94,7 @@ class ExtensionContentSettingsApiTest : public ExtensionApiTest { ...@@ -94,7 +94,7 @@ class ExtensionContentSettingsApiTest : public ExtensionApiTest {
EXPECT_EQ(CONTENT_SETTING_BLOCK, EXPECT_EQ(CONTENT_SETTING_BLOCK,
map->GetContentSetting(example_url, example_url, map->GetContentSetting(example_url, example_url,
ContentSettingsType::JAVASCRIPT)); ContentSettingsType::JAVASCRIPT));
EXPECT_EQ(CONTENT_SETTING_ALLOW, EXPECT_EQ(CONTENT_SETTING_BLOCK,
map->GetContentSetting(example_url, example_url, map->GetContentSetting(example_url, example_url,
ContentSettingsType::PLUGINS)); ContentSettingsType::PLUGINS));
EXPECT_EQ(CONTENT_SETTING_BLOCK, EXPECT_EQ(CONTENT_SETTING_BLOCK,
...@@ -130,7 +130,7 @@ class ExtensionContentSettingsApiTest : public ExtensionApiTest { ...@@ -130,7 +130,7 @@ class ExtensionContentSettingsApiTest : public ExtensionApiTest {
EXPECT_EQ( EXPECT_EQ(
CONTENT_SETTING_BLOCK, CONTENT_SETTING_BLOCK,
map->GetContentSetting(url, url, ContentSettingsType::JAVASCRIPT)); map->GetContentSetting(url, url, ContentSettingsType::JAVASCRIPT));
EXPECT_EQ(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, EXPECT_EQ(CONTENT_SETTING_BLOCK,
map->GetContentSetting(url, url, ContentSettingsType::PLUGINS)); map->GetContentSetting(url, url, ContentSettingsType::PLUGINS));
EXPECT_EQ(CONTENT_SETTING_ALLOW, EXPECT_EQ(CONTENT_SETTING_ALLOW,
map->GetContentSetting(url, url, ContentSettingsType::POPUPS)); map->GetContentSetting(url, url, ContentSettingsType::POPUPS));
...@@ -274,9 +274,8 @@ class ExtensionContentSettingsApiTestWithStandardFeatures ...@@ -274,9 +274,8 @@ class ExtensionContentSettingsApiTestWithStandardFeatures
: public ExtensionContentSettingsApiLazyTest { : public ExtensionContentSettingsApiLazyTest {
public: public:
ExtensionContentSettingsApiTestWithStandardFeatures() { ExtensionContentSettingsApiTestWithStandardFeatures() {
scoped_feature_list_.InitWithFeatures( scoped_feature_list_.InitAndEnableFeature(
{}, {content_settings::kDisallowWildcardsInPluginContentSettings, content_settings::kDisallowWildcardsInPluginContentSettings);
content_settings::kDisallowExtensionsToSetPluginContentSettings});
} }
private: private:
...@@ -316,37 +315,6 @@ IN_PROC_BROWSER_TEST_P(ExtensionContentSettingsApiTestWithStandardFeatures, ...@@ -316,37 +315,6 @@ IN_PROC_BROWSER_TEST_P(ExtensionContentSettingsApiTestWithStandardFeatures,
CheckContentSettingsDefault(); CheckContentSettingsDefault();
} }
// TODO(crbug.com/1073588): Make this test work in branded builds.
// Pass the plugins to look for into the JS to make this test less
// brittle or just have the JS side look for the additional plugins.
//
// Flaky on the trybots. See http://crbug.com/96725.
IN_PROC_BROWSER_TEST_P(ExtensionContentSettingsApiLazyTest,
DISABLED_GetResourceIdentifiers) {
base::FilePath::CharType kFooPath[] =
FILE_PATH_LITERAL("/plugins/foo.plugin");
base::FilePath::CharType kBarPath[] =
FILE_PATH_LITERAL("/plugins/bar.plugin");
const char kFooName[] = "Foo Plugin";
const char kBarName[] = "Bar Plugin";
content::PluginService::GetInstance()->RegisterInternalPlugin(
content::WebPluginInfo(base::ASCIIToUTF16(kFooName),
base::FilePath(kFooPath),
base::ASCIIToUTF16("1.2.3"),
base::ASCIIToUTF16("foo")),
false);
content::PluginService::GetInstance()->RegisterInternalPlugin(
content::WebPluginInfo(base::ASCIIToUTF16(kBarName),
base::FilePath(kBarPath),
base::ASCIIToUTF16("2.3.4"),
base::ASCIIToUTF16("bar")),
false);
EXPECT_TRUE(RunLazyTest("content_settings/getresourceidentifiers"))
<< message_;
}
IN_PROC_BROWSER_TEST_P(ExtensionContentSettingsApiLazyTest, IN_PROC_BROWSER_TEST_P(ExtensionContentSettingsApiLazyTest,
UnsupportedDefaultSettings) { UnsupportedDefaultSettings) {
const char kExtensionPath[] = "content_settings/unsupporteddefaultsettings"; const char kExtensionPath[] = "content_settings/unsupporteddefaultsettings";
...@@ -427,63 +395,12 @@ IN_PROC_BROWSER_TEST_P(ExtensionContentSettingsApiLazyTest, ...@@ -427,63 +395,12 @@ IN_PROC_BROWSER_TEST_P(ExtensionContentSettingsApiLazyTest,
"ContentSettings.ExtensionNonEmbeddedSettingSet", 2); "ContentSettings.ExtensionNonEmbeddedSettingSet", 2);
} }
class ExtensionContentSettingsApiTestWithWildcardMatchingDisabled
: public ExtensionContentSettingsApiLazyTest {
public:
ExtensionContentSettingsApiTestWithWildcardMatchingDisabled() {
scoped_feature_list_.InitWithFeatures(
{content_settings::kDisallowWildcardsInPluginContentSettings},
{content_settings::kDisallowExtensionsToSetPluginContentSettings});
}
private:
base::test::ScopedFeatureList scoped_feature_list_;
};
INSTANTIATE_TEST_SUITE_P(
EventPage,
ExtensionContentSettingsApiTestWithWildcardMatchingDisabled,
::testing::Values(ContextType::kEventPage));
INSTANTIATE_TEST_SUITE_P(
ServiceWorker,
ExtensionContentSettingsApiTestWithWildcardMatchingDisabled,
::testing::Values(ContextType::kServiceWorker));
IN_PROC_BROWSER_TEST_P(
ExtensionContentSettingsApiTestWithWildcardMatchingDisabled,
PluginTest) {
constexpr char kExtensionPath[] = "content_settings/pluginswildcardmatching";
EXPECT_TRUE(RunLazyTest(kExtensionPath)) << message_;
}
IN_PROC_BROWSER_TEST_P(
ExtensionContentSettingsApiTestWithWildcardMatchingDisabled,
ConsoleErrorTest) {
constexpr char kExtensionPath[] = "content_settings/pluginswildcardmatching";
const extensions::Extension* extension =
LoadExtension(test_data_dir_.AppendASCII(kExtensionPath));
ASSERT_TRUE(extension);
auto* web_contents = extensions::ProcessManager::Get(profile())
->GetBackgroundHostForExtension(extension->id())
->host_contents();
content::WebContentsConsoleObserver console_observer(web_contents);
console_observer.SetPattern(
content_settings_api_constants::kWildcardPatternsForPluginsDisallowed);
browsertest_util::ExecuteScriptInBackgroundPageNoWait(
profile(), extension->id(), "setWildcardedPatterns()");
console_observer.Wait();
EXPECT_EQ(1u, console_observer.messages().size());
}
class ExtensionContentSettingsApiTestWithPluginsApiDisabled class ExtensionContentSettingsApiTestWithPluginsApiDisabled
: public ExtensionContentSettingsApiLazyTest { : public ExtensionContentSettingsApiLazyTest {
public: public:
ExtensionContentSettingsApiTestWithPluginsApiDisabled() { ExtensionContentSettingsApiTestWithPluginsApiDisabled() {
scoped_feature_list_.InitWithFeatures( scoped_feature_list_.InitAndEnableFeature(
{content_settings::kDisallowWildcardsInPluginContentSettings, content_settings::kDisallowWildcardsInPluginContentSettings);
content_settings::kDisallowExtensionsToSetPluginContentSettings},
{});
} }
private: private:
......
...@@ -427,6 +427,10 @@ void ContentSettingsStore::SetExtensionContentSettingFromList( ...@@ -427,6 +427,10 @@ void ContentSettingsStore::SetExtensionContentSettingFromList(
// settings from the pref store when it is written back. // settings from the pref store when it is written back.
continue; continue;
} }
if (content_settings_type == ContentSettingsType::PLUGINS) {
// Plugin content settings are no longer supported for extensions.
continue;
}
const content_settings::ContentSettingsInfo* info = const content_settings::ContentSettingsInfo* info =
content_settings::ContentSettingsRegistry::GetInstance()->Get( content_settings::ContentSettingsRegistry::GetInstance()->Get(
...@@ -444,12 +448,6 @@ void ContentSettingsStore::SetExtensionContentSettingFromList( ...@@ -444,12 +448,6 @@ void ContentSettingsStore::SetExtensionContentSettingFromList(
// the pref store when it is written back. // the pref store when it is written back.
continue; continue;
} }
if (base::FeatureList::IsEnabled(
content_settings::kDisallowExtensionsToSetPluginContentSettings) &&
content_settings_type == ContentSettingsType::PLUGINS) {
// Plugin content settings are no longer supported for extensions.
continue;
}
std::string content_setting_string; std::string content_setting_string;
dict->GetString(content_settings_api_constants::kContentSettingKey, dict->GetString(content_settings_api_constants::kContentSettingKey,
......
...@@ -20,22 +20,21 @@ function expect(expected, message) { ...@@ -20,22 +20,21 @@ function expect(expected, message) {
chrome.test.runTests([ chrome.test.runTests([
function testPluginsApi() { function testPluginsApi() {
cs['plugins'].set({ cs['plugins'].set(
'primaryPattern': 'https://drive.google.com/*', {
'secondaryPattern': '<all_urls>', 'primaryPattern': 'https://*.google.com:443/*',
'setting': 'allow' 'secondaryPattern': '<all_urls>',
}); 'setting': 'allow'
cs['plugins'].set({ },
'primaryPattern': 'https://*.google.com:443/*', chrome.test.callbackFail(
'secondaryPattern': '<all_urls>', '`chrome.contentSettings.plugins.set()` API is no longer supported.'));
'setting': 'allow'
});
cs['plugins'].get( cs['plugins'].get(
{'primaryUrl': 'https://drive.google.com:443/*'}, {'primaryUrl': 'https://drive.google.com:443/*'},
expect({'setting': 'block'}, 'Flash should be blocked on this page')); chrome.test.callbackFail(
cs['plugins'].get( '`chrome.contentSettings.plugins.get()` API is no longer supported.'));
{'primaryUrl': 'http://mail.google.com:80/*'}, cs['plugins'].clear(
expect({'setting': 'block'}, 'Flash should be blocked on this page')); {},
cs['plugins'].clear({}); chrome.test.callbackFail(
'`chrome.contentSettings.plugins.clear()` API is no longer supported.'));
}, },
]); ]);
\ No newline at end of file
{
"name" : "Content Settings API Test Extension",
"version" : "0.1",
"manifest_version": 2,
"description" : "Sets and checks exceptions to allow flash, ensures wildcard patterns are not allowed",
"background": {
"scripts": ["test.js"],
"persistent": false
},
"permissions": [ "contentSettings" ]
}
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var cs = chrome.contentSettings;
function setWildcardedPatterns() {
cs['plugins'].set({
'primaryPattern': '<all_urls>',
'secondaryPattern': '<all_urls>',
'setting': 'allow'
});
}
function expect(expected, message) {
return chrome.test.callbackPass(function(value) {
chrome.test.assertEq(expected, value, message);
});
}
chrome.test.runTests([
function testSchemeWildcardMatching() {
cs['plugins'].set({
'primaryPattern': '*://drive.google.com:*/*',
'secondaryPattern': '<all_urls>',
'setting': 'allow'
});
cs['plugins'].set({
'primaryPattern': 'https://maps.google.com:443/*',
'secondaryPattern': '<all_urls>',
'setting': 'allow'
});
cs['plugins'].get(
{'primaryUrl': 'https://drive.google.com:443/*'},
expect({'setting': 'allow'}, 'Flash should be blocked on this page'));
cs['plugins'].get(
{'primaryUrl': 'http://drive.google.com:80/*'},
expect({'setting': 'allow'}, 'Flash should be blocked on this page'));
cs['plugins'].get(
{'primaryUrl': 'https://maps.google.com:443/*'},
expect({'setting': 'allow'}, 'Flash should be blocked on this page'));
cs['plugins'].clear({});
},
function testPortWildcardMatching() {
cs['plugins'].set({
'primaryPattern': 'https://drive.google.com:*/*',
'secondaryPattern': '<all_urls>',
'setting': 'allow'
});
cs['plugins'].set({
'primaryPattern': 'https://maps.google.com:443/*',
'secondaryPattern': '<all_urls>',
'setting': 'allow'
});
cs['plugins'].get(
{'primaryUrl': 'https://drive.google.com:100/'},
expect({'setting': 'allow'}, 'Flash should be allowed on this page'));
cs['plugins'].get(
{'primaryUrl': 'https://maps.google.com:443/'},
expect({'setting': 'allow'}, 'Flash should be allowed on this page'));
cs['plugins'].clear({});
},
function testSubdomainWildcardMatching() {
cs['plugins'].set({
'primaryPattern': 'https://*.google.com:443/*',
'secondaryPattern': '<all_urls>',
'setting': 'allow'
});
cs['plugins'].get(
{'primaryUrl': 'http://drive.google.com:443/'},
expect({'setting': 'block'}, 'Flash should be blocked on this page'));
cs['plugins'].clear({});
},
function testFullWilcardMatching() {
cs['plugins'].set({
'primaryPattern': '<all_urls>',
'secondaryPattern': '<all_urls>',
'setting': 'allow'
});
cs['plugins'].set({
'primaryPattern': 'https://*/*',
'secondaryPattern': '<all_urls>',
'setting': 'allow'
});
cs['plugins'].set({
'primaryPattern': '*://*/*',
'secondaryPattern': '<all_urls>',
'setting': 'allow'
});
cs['plugins'].get(
{'primaryUrl': 'https://drive.google.com:443/'},
expect({'setting': 'block'}, 'Flash should be blocked on this page'));
cs['plugins'].get(
{'primaryUrl': 'https://example.com:443/'},
expect({'setting': 'block'}, 'Flash should be blocked on this page'));
cs['plugins'].clear({});
},
]);
\ No newline at end of file
...@@ -10,7 +10,6 @@ var default_content_settings = { ...@@ -10,7 +10,6 @@ var default_content_settings = {
"cookies": "session_only", "cookies": "session_only",
"images": "allow", "images": "allow",
"javascript": "block", "javascript": "block",
"plugins": "allow",
"popups": "block", "popups": "block",
"location": "ask", "location": "ask",
"notifications": "ask", "notifications": "ask",
...@@ -26,7 +25,6 @@ var settings = { ...@@ -26,7 +25,6 @@ var settings = {
"cookies": "block", "cookies": "block",
"images": "allow", "images": "allow",
"javascript": "block", "javascript": "block",
"plugins": "detect_important_content",
"popups": "allow", "popups": "allow",
"location": "block", "location": "block",
"notifications": "block", "notifications": "block",
......
...@@ -19,8 +19,4 @@ const base::Feature kDisallowWildcardsInPluginContentSettings{ ...@@ -19,8 +19,4 @@ const base::Feature kDisallowWildcardsInPluginContentSettings{
"DisallowWildcardsInPluginContentSettings", "DisallowWildcardsInPluginContentSettings",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kDisallowExtensionsToSetPluginContentSettings{
"DisallowExtensionsToSetPluginContentSettings",
base::FEATURE_ENABLED_BY_DEFAULT};
} // namespace content_settings } // namespace content_settings
...@@ -24,11 +24,6 @@ extern const base::Feature kImprovedCookieControls; ...@@ -24,11 +24,6 @@ extern const base::Feature kImprovedCookieControls;
COMPONENT_EXPORT(CONTENT_SETTINGS_FEATURES) COMPONENT_EXPORT(CONTENT_SETTINGS_FEATURES)
extern const base::Feature kDisallowWildcardsInPluginContentSettings; extern const base::Feature kDisallowWildcardsInPluginContentSettings;
// Feature to remove the chrome.contentSettings.plugins.set() API in extensions
// for extensions.
COMPONENT_EXPORT(CONTENT_SETTINGS_FEATURES)
extern const base::Feature kDisallowExtensionsToSetPluginContentSettings;
} // namespace content_settings } // namespace content_settings
#endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_FEATURES_H_ #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_FEATURES_H_
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