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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 1962163002: Revert of [Chrome Settings UI] If User Exceptions are not allowed, prevent editing / viewing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/ui/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 7cb004959a79f636f94b260eee56cdd4526cc53d..04bc2a1086f2bc0ac94ba7b8dc45514c25d7d297 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -878,16 +878,6 @@
web_ui()->CallJavascriptFunction(
"ContentSettings.setContentFilterSettingsValue", filter_settings);
-
- // We assume that special cases covered above to get |provider_id| are not
- // needed in AreUserExceptionsAllowedForType().
- bool maybe_enable_exceptions =
- GetContentSettingsMap()->AreUserExceptionsAllowedForType(type);
-
- web_ui()->CallJavascriptFunction(
- "ContentSettings.setUserExceptionsAllowed",
- base::StringValue(ContentSettingsTypeToGroupName(type)),
- base::FundamentalValue(maybe_enable_exceptions));
}
void ContentSettingsHandler::UpdateMediaSettingsFromPrefs(
@@ -973,7 +963,8 @@
// Don't add default settings.
if (i->primary_pattern == ContentSettingsPattern::Wildcard() &&
i->secondary_pattern == ContentSettingsPattern::Wildcard() &&
- i->source != site_settings::kPreferencesSource) {
+ i
+ ->source != site_settings::kPreferencesSource) {
continue;
}
all_patterns_settings[std::make_pair(i->primary_pattern, i->source)]
@@ -1484,12 +1475,6 @@
std::string type_string;
CHECK(args->GetString(0, &type_string));
- ContentSettingsType type = ContentSettingsTypeFromGroupName(type_string);
-
- // If user exceptions are disabled for |type|, don't remove.
- if (!GetContentSettingsMap()->AreUserExceptionsAllowedForType(type))
- return;
-
// Zoom levels are no actual content type so we need to handle them
// separately. They would not be recognized by
// ContentSettingsTypeFromGroupName.
@@ -1505,6 +1490,7 @@
return;
}
+ ContentSettingsType type = ContentSettingsTypeFromGroupName(type_string);
RemoveExceptionFromHostContentSettingsMap(args, type);
WebSiteSettingsUmaUtil::LogPermissionChange(
@@ -1528,10 +1514,6 @@
type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA) {
NOTREACHED();
} else {
- // If user exceptions are disabled for |type|, don't set.
- if (!GetContentSettingsMap()->AreUserExceptionsAllowedForType(type))
- return;
-
HostContentSettingsMap* settings_map =
mode == "normal" ? GetContentSettingsMap() :
GetOTRContentSettingsMap();
« no previous file with comments | « chrome/browser/resources/options/content_settings_exceptions_area.js ('k') | ui/webui/resources/js/cr/ui/array_data_model.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698