Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3179)

Unified Diff: chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc

Issue 2877553002: [subresource_filter] Swap ALLOW and BLOCK meanings in the content setting (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc
diff --git a/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc b/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc
index 0fec6e7427b0d8b002c9fed602bf334dde34258d..48d94eb3cc19900f0d13e252f4710db1424ec194 100644
--- a/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc
+++ b/chrome/browser/subresource_filter/subresource_filter_content_settings_manager.cc
@@ -80,8 +80,8 @@ void SubresourceFilterContentSettingsManager::WhitelistSite(const GURL& url) {
settings_map_->SetContentSettingDefaultScope(
url, GURL(),
ContentSettingsType::CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER,
- std::string(), CONTENT_SETTING_BLOCK);
- ChromeSubresourceFilterClient::LogAction(kActionContentSettingsBlockedFromUI);
+ std::string(), CONTENT_SETTING_ALLOW);
+ ChromeSubresourceFilterClient::LogAction(kActionContentSettingsAllowedFromUI);
}
void SubresourceFilterContentSettingsManager::OnDidShowUI(const GURL& url) {
@@ -142,12 +142,12 @@ void SubresourceFilterContentSettingsManager::OnContentSettingChanged(
if (details.update_all()) {
ContentSetting global_setting = settings_map_->GetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, nullptr);
- if (global_setting == CONTENT_SETTING_BLOCK) {
- ChromeSubresourceFilterClient::LogAction(
- kActionContentSettingsBlockedGlobal);
- } else if (global_setting == CONTENT_SETTING_ALLOW) {
+ if (global_setting == CONTENT_SETTING_ALLOW) {
ChromeSubresourceFilterClient::LogAction(
kActionContentSettingsAllowedGlobal);
+ } else if (global_setting == CONTENT_SETTING_BLOCK) {
+ ChromeSubresourceFilterClient::LogAction(
+ kActionContentSettingsBlockedGlobal);
} else {
NOTREACHED();
}
@@ -171,10 +171,10 @@ void SubresourceFilterContentSettingsManager::OnContentSettingChanged(
ContentSetting setting = settings_map_->GetContentSetting(
url, url, ContentSettingsType::CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER,
std::string());
- if (setting == CONTENT_SETTING_BLOCK) {
- ChromeSubresourceFilterClient::LogAction(kActionContentSettingsBlocked);
- } else if (setting == CONTENT_SETTING_ALLOW) {
+ if (setting == CONTENT_SETTING_ALLOW) {
ChromeSubresourceFilterClient::LogAction(kActionContentSettingsAllowed);
+ } else if (setting == CONTENT_SETTING_BLOCK) {
+ ChromeSubresourceFilterClient::LogAction(kActionContentSettingsBlocked);
} else {
NOTREACHED();
}
@@ -184,7 +184,7 @@ void SubresourceFilterContentSettingsManager::OnContentSettingChanged(
if (!ShouldShowUIForSite(url)) {
ChromeSubresourceFilterClient::LogAction(
- kActionContentSettingsBlockedWhileUISuppressed);
+ kActionContentSettingsAllowedWhileUISuppressed);
}
// Reset the smart UI to ensure the user can easily change their decision.

Powered by Google App Engine
This is Rietveld 408576698