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

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

Issue 8486002: Don't display the default content settings (wildcard patterns) in exceptions lists. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7f6b9e09f6314270f5e056a1f6b71abb61215d95..8878f9a97f83e8bc5218705c027e55098fd4b369 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -481,6 +481,12 @@ void ContentSettingsHandler::UpdateGeolocationExceptionsView() {
all_settings.begin();
i != all_settings.end();
++i) {
+ // Don't add default settings.
+ if (i->primary_pattern == ContentSettingsPattern::Wildcard() &&
+ i->secondary_pattern == ContentSettingsPattern::Wildcard() &&
+ i->source != "preferences") {
+ continue;
+ }
all_patterns_settings[i->primary_pattern][i->secondary_pattern] =
i->setting;
}
@@ -538,6 +544,13 @@ void ContentSettingsHandler::UpdateNotificationExceptionsView() {
settings.begin();
i != settings.end();
++i) {
+ // Don't add default settings.
+ if (i->primary_pattern == ContentSettingsPattern::Wildcard() &&
+ i->secondary_pattern == ContentSettingsPattern::Wildcard() &&
+ i->source != "preferences") {
+ continue;
+ }
+
exceptions.Append(
GetNotificationExceptionForPage(i->primary_pattern, i->setting,
i->source));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698