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, ...@@ -65,7 +65,7 @@ bool RemoveContentType(base::ListValue* args,
args->Remove(0, nullptr); args->Remove(0, nullptr);
// PLUGINS have been deprecated, so ignore requests for removing them. // PLUGINS have been deprecated, so ignore requests for removing them.
if (content_type_str == "plugins") { if (content_type_str == "plugins") {
*content_type = ContentSettingsType::PLUGINS; *content_type = ContentSettingsType::DEPRECATED_PLUGINS;
return true; return true;
} }
*content_type = *content_type =
...@@ -86,7 +86,7 @@ ContentSettingsContentSettingClearFunction::Run() { ...@@ -86,7 +86,7 @@ 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) { if (content_type == ContentSettingsType::DEPRECATED_PLUGINS) {
return RespondNow( return RespondNow(
Error(content_settings_api_constants:: Error(content_settings_api_constants::
kSettingPluginContentSettingsClearIsDisallowed)); kSettingPluginContentSettingsClearIsDisallowed));
...@@ -126,7 +126,7 @@ ContentSettingsContentSettingGetFunction::Run() { ...@@ -126,7 +126,7 @@ 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) { if (content_type == ContentSettingsType::DEPRECATED_PLUGINS) {
return RespondNow(Error(content_settings_api_constants:: return RespondNow(Error(content_settings_api_constants::
kSettingPluginContentSettingsGetIsDisallowed)); kSettingPluginContentSettingsGetIsDisallowed));
} }
...@@ -200,7 +200,7 @@ ContentSettingsContentSettingSetFunction::Run() { ...@@ -200,7 +200,7 @@ ContentSettingsContentSettingSetFunction::Run() {
EXTENSION_FUNCTION_VALIDATE(params.get()); EXTENSION_FUNCTION_VALIDATE(params.get());
// PLUGINS have been deprecated. // PLUGINS have been deprecated.
if (content_type == ContentSettingsType::PLUGINS) { if (content_type == ContentSettingsType::DEPRECATED_PLUGINS) {
return RespondNow(Error(content_settings_api_constants:: return RespondNow(Error(content_settings_api_constants::
kSettingPluginContentSettingsIsDisallowed)); kSettingPluginContentSettingsIsDisallowed));
} }
...@@ -329,7 +329,7 @@ ContentSettingsContentSettingGetResourceIdentifiersFunction::Run() { ...@@ -329,7 +329,7 @@ ContentSettingsContentSettingGetResourceIdentifiersFunction::Run() {
ContentSettingsType content_type; ContentSettingsType content_type;
EXTENSION_FUNCTION_VALIDATE(RemoveContentType(args_.get(), &content_type)); EXTENSION_FUNCTION_VALIDATE(RemoveContentType(args_.get(), &content_type));
if (content_type != ContentSettingsType::PLUGINS) { if (content_type != ContentSettingsType::DEPRECATED_PLUGINS) {
return RespondNow(NoArguments()); return RespondNow(NoArguments());
} }
......
...@@ -151,8 +151,8 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { ...@@ -151,8 +151,8 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{ContentSettingsType::DISPLAY_CAPTURE, nullptr}, {ContentSettingsType::DISPLAY_CAPTURE, nullptr},
}; };
// TODO(crbug.com/1149878): After removing ContentSettingsType::PLUGINS, remove // TODO(crbug.com/1149878): After removing
// +1. // ContentSettingsType::DEPRECATED_PLUGINS, remove +1.
static_assert(base::size(kContentSettingsTypeGroupNames) + 1 == static_assert(base::size(kContentSettingsTypeGroupNames) + 1 ==
// ContentSettingsType starts at -1, so add 1 here. // ContentSettingsType starts at -1, so add 1 here.
static_cast<int32_t>(ContentSettingsType::NUM_TYPES) + 1, static_cast<int32_t>(ContentSettingsType::NUM_TYPES) + 1,
......
...@@ -32,7 +32,7 @@ constexpr HistogramValue kHistogramValue[] = { ...@@ -32,7 +32,7 @@ constexpr HistogramValue kHistogramValue[] = {
{ContentSettingsType::COOKIES, 0}, {ContentSettingsType::COOKIES, 0},
{ContentSettingsType::IMAGES, 1}, {ContentSettingsType::IMAGES, 1},
{ContentSettingsType::JAVASCRIPT, 2}, {ContentSettingsType::JAVASCRIPT, 2},
{ContentSettingsType::PLUGINS, 3}, {ContentSettingsType::DEPRECATED_PLUGINS, 3},
{ContentSettingsType::POPUPS, 4}, {ContentSettingsType::POPUPS, 4},
{ContentSettingsType::GEOLOCATION, 5}, {ContentSettingsType::GEOLOCATION, 5},
{ContentSettingsType::NOTIFICATIONS, 6}, {ContentSettingsType::NOTIFICATIONS, 6},
......
...@@ -21,7 +21,7 @@ enum class ContentSettingsType : int32_t { ...@@ -21,7 +21,7 @@ enum class ContentSettingsType : int32_t {
COOKIES = 0, COOKIES = 0,
IMAGES, IMAGES,
JAVASCRIPT, JAVASCRIPT,
PLUGINS, DEPRECATED_PLUGINS,
// This setting governs both popups and unwanted redirects like tab-unders and // This setting governs both popups and unwanted redirects like tab-unders and
// framebusting. // 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