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

Unified Diff: chrome/browser/ui/gtk/collected_cookies_gtk.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/gtk/collected_cookies_gtk.cc
diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.cc b/chrome/browser/ui/gtk/collected_cookies_gtk.cc
index 963dcc3d95d22e04d80dfabb5b89b95c146ee97f..dd3b61a4ab8741aa3df060fb8f9c04526192f36b 100644
--- a/chrome/browser/ui/gtk/collected_cookies_gtk.cc
+++ b/chrome/browser/ui/gtk/collected_cookies_gtk.cc
@@ -6,10 +6,11 @@
#include <string>
-#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/gtk/constrained_window_gtk.h"
@@ -17,6 +18,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/pref_names.h"
#include "content/common/notification_source.h"
#include "grit/generated_resources.h"
#include "ui/base/gtk/gtk_hig_constants.h"
@@ -238,14 +240,13 @@ GtkWidget* CollectedCookiesGtk::CreateAllowedPane() {
}
GtkWidget* CollectedCookiesGtk::CreateBlockedPane() {
- HostContentSettingsMap* host_content_settings_map =
- wrapper_->profile()->GetHostContentSettingsMap();
+ PrefService* prefs = wrapper_->profile()->GetPrefs();
GtkWidget* cookie_list_vbox = gtk_vbox_new(FALSE, ui::kControlSpacing);
GtkWidget* label = gtk_label_new(
l10n_util::GetStringUTF8(
- host_content_settings_map->BlockThirdPartyCookies() ?
+ prefs->GetBoolean(prefs::kBlockThirdPartyCookies) ?
IDS_COLLECTED_COOKIES_BLOCKED_THIRD_PARTY_BLOCKING_ENABLED :
IDS_COLLECTED_COOKIES_BLOCKED_COOKIES_LABEL).c_str());
gtk_widget_set_size_request(label, kTreeViewWidth, -1);
@@ -459,7 +460,7 @@ void CollectedCookiesGtk::AddExceptions(GtkTreeSelection* selection,
last_domain_name = origin_node->GetTitle();
Profile* profile = wrapper_->profile();
origin_node->CreateContentException(
- profile->GetHostContentSettingsMap(), setting);
+ CookieSettings::GetForProfile(profile), setting);
}
}
g_list_foreach(paths, reinterpret_cast<GFunc>(gtk_tree_path_free), NULL);

Powered by Google App Engine
This is Rietveld 408576698