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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 1417023007: Replace HostContentSettingsMap::AddExceptionForURL with SetNarrowestWebsiteSetting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/ui/content_settings/content_setting_bubble_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 76351bd18260d8b26f21e23fefa360ad9285ec6b..9525c138632ffd3f1569852fd24f139c01781a8e 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -256,7 +256,7 @@ class ContentSettingSingleRadioGroup
private:
void SetRadioGroup();
- void AddException(ContentSetting setting);
+ void SetNarrowestContentSetting(ContentSetting setting);
void OnRadioClicked(int radio_index) override;
ContentSetting block_setting_;
@@ -281,7 +281,7 @@ ContentSettingSingleRadioGroup::~ContentSettingSingleRadioGroup() {
selected_item_ == kAllowButtonIndex ?
CONTENT_SETTING_ALLOW :
block_setting_;
- AddException(setting);
+ SetNarrowestContentSetting(setting);
}
}
@@ -414,13 +414,13 @@ void ContentSettingSingleRadioGroup::SetRadioGroup() {
set_radio_group(radio_group);
}
-void ContentSettingSingleRadioGroup::AddException(ContentSetting setting) {
+void ContentSettingSingleRadioGroup::SetNarrowestContentSetting(
+ ContentSetting setting) {
if (profile()) {
- HostContentSettingsMapFactory::GetForProfile(profile())->AddExceptionForURL(
- bubble_content().radio_group.url,
- bubble_content().radio_group.url,
- content_type(),
- setting);
+ HostContentSettingsMapFactory::GetForProfile(profile())
+ ->SetNarrowestContentSetting(bubble_content().radio_group.url,
+ bubble_content().radio_group.url,
+ content_type(), setting);
}
}

Powered by Google App Engine
This is Rietveld 408576698