Commit f69438d4 authored by Illia Klimov's avatar Illia Klimov Committed by Chromium LUCI CQ

Rename deprecated ContentSettingsType::PLUGINS to

ContentSettingsType::DEPRECATED_PLUGINS.

TBR=engedy@chromium.org

Bug: 1149878
Change-Id: I6d46920dd64f1e08f7565f4a6302a4732796b072
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2613973
Commit-Queue: Illia Klimov <elklm@chromium.org>
Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842509}
parent c388442d
......@@ -65,7 +65,7 @@ bool RemoveContentType(base::ListValue* args,
args->Remove(0, nullptr);
// PLUGINS have been deprecated, so ignore requests for removing them.
if (content_type_str == "plugins") {
*content_type = ContentSettingsType::PLUGINS;
*content_type = ContentSettingsType::DEPRECATED_PLUGINS;
return true;
}
*content_type =
......@@ -86,7 +86,7 @@ ContentSettingsContentSettingClearFunction::Run() {
std::unique_ptr<Clear::Params> params(Clear::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
if (content_type == ContentSettingsType::PLUGINS) {
if (content_type == ContentSettingsType::DEPRECATED_PLUGINS) {
return RespondNow(
Error(content_settings_api_constants::
kSettingPluginContentSettingsClearIsDisallowed));
......@@ -126,7 +126,7 @@ ContentSettingsContentSettingGetFunction::Run() {
std::unique_ptr<Get::Params> params(Get::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
if (content_type == ContentSettingsType::PLUGINS) {
if (content_type == ContentSettingsType::DEPRECATED_PLUGINS) {
return RespondNow(Error(content_settings_api_constants::
kSettingPluginContentSettingsGetIsDisallowed));
}
......@@ -200,7 +200,7 @@ ContentSettingsContentSettingSetFunction::Run() {
EXTENSION_FUNCTION_VALIDATE(params.get());
// PLUGINS have been deprecated.
if (content_type == ContentSettingsType::PLUGINS) {
if (content_type == ContentSettingsType::DEPRECATED_PLUGINS) {
return RespondNow(Error(content_settings_api_constants::
kSettingPluginContentSettingsIsDisallowed));
}
......@@ -329,7 +329,7 @@ ContentSettingsContentSettingGetResourceIdentifiersFunction::Run() {
ContentSettingsType content_type;
EXTENSION_FUNCTION_VALIDATE(RemoveContentType(args_.get(), &content_type));
if (content_type != ContentSettingsType::PLUGINS) {
if (content_type != ContentSettingsType::DEPRECATED_PLUGINS) {
return RespondNow(NoArguments());
}
......
......@@ -151,8 +151,8 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{ContentSettingsType::DISPLAY_CAPTURE, nullptr},
};
// TODO(crbug.com/1149878): After removing ContentSettingsType::PLUGINS, remove
// +1.
// TODO(crbug.com/1149878): After removing
// ContentSettingsType::DEPRECATED_PLUGINS, remove +1.
static_assert(base::size(kContentSettingsTypeGroupNames) + 1 ==
// ContentSettingsType starts at -1, so add 1 here.
static_cast<int32_t>(ContentSettingsType::NUM_TYPES) + 1,
......
......@@ -32,7 +32,7 @@ constexpr HistogramValue kHistogramValue[] = {
{ContentSettingsType::COOKIES, 0},
{ContentSettingsType::IMAGES, 1},
{ContentSettingsType::JAVASCRIPT, 2},
{ContentSettingsType::PLUGINS, 3},
{ContentSettingsType::DEPRECATED_PLUGINS, 3},
{ContentSettingsType::POPUPS, 4},
{ContentSettingsType::GEOLOCATION, 5},
{ContentSettingsType::NOTIFICATIONS, 6},
......
......@@ -21,7 +21,7 @@ enum class ContentSettingsType : int32_t {
COOKIES = 0,
IMAGES,
JAVASCRIPT,
PLUGINS,
DEPRECATED_PLUGINS,
// This setting governs both popups and unwanted redirects like tab-unders and
// framebusting.
......
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