summaryrefslogtreecommitdiffstats
path: root/chrome/browser/content_setting_bubble_model.cc
diff options
context:
space:
mode:
authorbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 10:21:10 +0000
committerbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 10:21:10 +0000
commitbee119bb4f8c817287d742b149a3c8394a80e9c7 (patch)
tree9146262538048f0d7660ac147ebadee3ca76fbb2 /chrome/browser/content_setting_bubble_model.cc
parenta68dcca410f7726c1e379037bd12c85dffb922bc (diff)
downloadchromium_src-bee119bb4f8c817287d742b149a3c8394a80e9c7.zip
chromium_src-bee119bb4f8c817287d742b149a3c8394a80e9c7.tar.gz
chromium_src-bee119bb4f8c817287d742b149a3c8394a80e9c7.tar.bz2
Simplify content settings bubble model "radio groups" to a single radio group.
There's no longer a use case for multiple radio groups (was originally planned for Geolocation), simplify the model and its views. BUG=39073 TEST=content_setting_bubble_model_unittest Review URL: http://codereview.chromium.org/1575022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44070 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_setting_bubble_model.cc')
-rw-r--r--chrome/browser/content_setting_bubble_model.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/content_setting_bubble_model.cc b/chrome/browser/content_setting_bubble_model.cc
index 1318ac0..e385029 100644
--- a/chrome/browser/content_setting_bubble_model.cc
+++ b/chrome/browser/content_setting_bubble_model.cc
@@ -67,11 +67,11 @@ class ContentSettingSingleRadioGroup : public ContentSettingTitleAndLinkModel {
ContentSettingSingleRadioGroup(TabContents* tab_contents, Profile* profile,
ContentSettingsType content_type)
: ContentSettingTitleAndLinkModel(tab_contents, profile, content_type) {
- SetRadioGroups();
+ SetRadioGroup();
}
private:
- void SetRadioGroups() {
+ void SetRadioGroup() {
GURL url = tab_contents()->GetURL();
std::wstring display_host_wide;
net::AppendFormattedHost(url,
@@ -115,13 +115,13 @@ class ContentSettingSingleRadioGroup : public ContentSettingTitleAndLinkModel {
radio_group.default_item =
profile()->GetHostContentSettingsMap()->GetContentSetting(url,
content_type()) == CONTENT_SETTING_ALLOW ? 0 : 1;
- add_radio_group(radio_group);
+ set_radio_group(radio_group);
}
- virtual void OnRadioClicked(int radio_group, int radio_index) {
+ virtual void OnRadioClicked(int radio_index) {
profile()->GetHostContentSettingsMap()->SetContentSetting(
HostContentSettingsMap::Pattern::FromURL(
- bubble_content().radio_groups[radio_group].url),
+ bubble_content().radio_group.url),
content_type(),
radio_index == 0 ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK);
}