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

Unified Diff: chrome/browser/ui/views/collected_cookies_win.cc

Issue 8383004: Adding CookieSettings for storing cookie content settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/views/collected_cookies_win.cc
diff --git a/chrome/browser/ui/views/collected_cookies_win.cc b/chrome/browser/ui/views/collected_cookies_win.cc
index 602eafce016854333253ea6ad60be225a33e82e7..66ac121bd7871f874b7288d9be6c78a9a2c08763 100644
--- a/chrome/browser/ui/views/collected_cookies_win.cc
+++ b/chrome/browser/ui/views/collected_cookies_win.cc
@@ -4,10 +4,11 @@
#include "chrome/browser/ui/views/collected_cookies_win.h"
-#include "chrome/browser/content_settings/host_content_settings_map.h"
+#include "chrome/browser/content_settings/cookie_settings.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/cookies_tree_model.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
+#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/collected_cookies_infobar_delegate.h"
#include "chrome/browser/ui/constrained_window.h"
@@ -15,6 +16,7 @@
#include "chrome/browser/ui/views/constrained_window_views.h"
#include "chrome/browser/ui/views/cookie_info_view.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
@@ -287,13 +289,12 @@ views::View* CollectedCookiesWin::CreateAllowedPane() {
views::View* CollectedCookiesWin::CreateBlockedPane() {
TabSpecificContentSettings* content_settings = wrapper_->content_settings();
- HostContentSettingsMap* host_content_settings_map =
- wrapper_->profile()->GetHostContentSettingsMap();
+ PrefService* prefs = wrapper_->profile()->GetPrefs();
// Create the controls that go into the pane.
blocked_label_ = new views::Label(
l10n_util::GetStringUTF16(
- host_content_settings_map->BlockThirdPartyCookies() ?
+ prefs->GetBoolean(prefs::kBlockThirdPartyCookies) ?
IDS_COLLECTED_COOKIES_BLOCKED_THIRD_PARTY_BLOCKING_ENABLED :
IDS_COLLECTED_COOKIES_BLOCKED_COOKIES_LABEL));
blocked_label_->SetMultiLine(true);
@@ -481,7 +482,7 @@ void CollectedCookiesWin::AddContentException(views::TreeView* tree_view,
CookieTreeOriginNode* origin_node =
static_cast<CookieTreeOriginNode*>(tree_view->GetSelectedNode());
Profile* profile = wrapper_->profile();
- origin_node->CreateContentException(profile->GetHostContentSettingsMap(),
+ origin_node->CreateContentException(CookieSettings::GetForProfile(profile),
setting);
infobar_->UpdateVisibility(true, setting, origin_node->GetTitle());
gfx::Rect bounds = GetWidget()->GetClientAreaScreenBounds();

Powered by Google App Engine
This is Rietveld 408576698