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

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

Issue 8383004: Adding CookieSettings for storing cookie content settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing the rebase. Created 9 years, 2 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/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 65833ac36aef5c650d5d56bab9739eb08f906473..344e2010f1dc422a30906fa92c88181d1f8d76a7 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/content_settings/cookie_settings.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
@@ -253,14 +254,15 @@ class ContentSettingSingleRadioGroup
radio_group.radio_items.push_back(radio_allow_label);
radio_group.radio_items.push_back(radio_block_label);
HostContentSettingsMap* map = profile()->GetHostContentSettingsMap();
- ContentSetting mostRestrictiveSetting;
+ CookieSettings* cookie_settings = CookieSettings::GetForProfile(profile());
+ ContentSetting most_restrictive_setting;
if (resources.empty()) {
- mostRestrictiveSetting =
+ most_restrictive_setting =
content_type() == CONTENT_SETTINGS_TYPE_COOKIES ?
- map->GetCookieContentSetting(url, url, true) :
+ cookie_settings->GetCookieSetting(url, url, true) :
map->GetContentSetting(url, url, content_type(), std::string());
} else {
- mostRestrictiveSetting = CONTENT_SETTING_ALLOW;
+ most_restrictive_setting = CONTENT_SETTING_ALLOW;
for (std::set<std::string>::const_iterator it = resources.begin();
it != resources.end(); ++it) {
ContentSetting setting = map->GetContentSetting(url,
@@ -268,19 +270,19 @@ class ContentSettingSingleRadioGroup
content_type(),
*it);
if (setting == CONTENT_SETTING_BLOCK) {
- mostRestrictiveSetting = CONTENT_SETTING_BLOCK;
+ most_restrictive_setting = CONTENT_SETTING_BLOCK;
break;
}
if (setting == CONTENT_SETTING_ASK)
- mostRestrictiveSetting = CONTENT_SETTING_ASK;
+ most_restrictive_setting = CONTENT_SETTING_ASK;
}
}
- if (mostRestrictiveSetting == CONTENT_SETTING_ALLOW) {
+ if (most_restrictive_setting == CONTENT_SETTING_ALLOW) {
radio_group.default_item = 0;
// |block_setting_| is already set to |CONTENT_SETTING_BLOCK|.
} else {
radio_group.default_item = 1;
- block_setting_ = mostRestrictiveSetting;
+ block_setting_ = most_restrictive_setting;
}
selected_item_ = radio_group.default_item;
set_radio_group(radio_group);
« no previous file with comments | « chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm ('k') | chrome/browser/ui/gtk/collected_cookies_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698