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

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

Issue 7713034: HostContentSettingsMap refactoring. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Keeping up to date with trunk. Created 9 years, 3 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 7aee53b41a03ae6236d40eb90111ec045ee395b9..c9848a4ce6806d93bd71f871f110584d49d30080 100644
--- a/chrome/browser/ui/views/collected_cookies_win.cc
+++ b/chrome/browser/ui/views/collected_cookies_win.cc
@@ -4,7 +4,7 @@
#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"
@@ -14,6 +14,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/common/notification_details.h"
#include "content/common/notification_source.h"
#include "grit/generated_resources.h"
@@ -285,14 +286,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(
UTF16ToWide(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);
@@ -480,7 +479,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