diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-19 09:29:02 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-19 09:29:02 +0000 |
commit | cbd426185e5893b46084922ea4c6c766cd94bc26 (patch) | |
tree | 30b0904baab77b0925f7b2f4c0a38a6aa22601b3 /chrome/browser/content_setting_bubble_model.cc | |
parent | c2751189951618b8a7b908d30083bb8a5efb7e52 (diff) | |
download | chromium_src-cbd426185e5893b46084922ea4c6c766cd94bc26.zip chromium_src-cbd426185e5893b46084922ea4c6c766cd94bc26.tar.gz chromium_src-cbd426185e5893b46084922ea4c6c766cd94bc26.tar.bz2 |
Preparatory work for adding content exceptions from the tab cookie view.
Factor out HostContentSettingsMap::AddExceptionForURL() and add CookieTreeOriginNode::CreateContentException().
Review URL: http://codereview.chromium.org/2868059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_setting_bubble_model.cc')
-rw-r--r-- | chrome/browser/content_setting_bubble_model.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/chrome/browser/content_setting_bubble_model.cc b/chrome/browser/content_setting_bubble_model.cc index 6fc78e1..6d8b902 100644 --- a/chrome/browser/content_setting_bubble_model.cc +++ b/chrome/browser/content_setting_bubble_model.cc @@ -166,16 +166,8 @@ class ContentSettingSingleRadioGroup : public ContentSettingTitleAndLinkModel { } virtual void OnRadioClicked(int radio_index) { - // Make sure there is no entry that would override the pattern we are about - // to insert for exactly this URL. - profile()->GetHostContentSettingsMap()->SetContentSetting( - HostContentSettingsMap::Pattern::FromURLNoWildcard( - bubble_content().radio_group.url), - content_type(), - CONTENT_SETTING_DEFAULT); - profile()->GetHostContentSettingsMap()->SetContentSetting( - HostContentSettingsMap::Pattern::FromURL( - bubble_content().radio_group.url), + profile()->GetHostContentSettingsMap()->AddExceptionForURL( + bubble_content().radio_group.url, content_type(), radio_index == 0 ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK); } |