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

Unified Diff: chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm

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/cocoa/content_settings/collected_cookies_mac.mm
diff --git a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
index 358fbbfaa90eb98da9e28cf3bf4ff834c022d68f..a7e2d9dc039a93a46e3bc1da0e826b51224d506b 100644
--- a/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
+++ b/chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm
@@ -8,9 +8,10 @@
#import "base/mac/mac_util.h"
#include "base/sys_string_conversions.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/infobars/infobar_tab_helper.h"
+#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/cocoa/constrained_window_mac.h"
#import "chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller.h"
@@ -18,6 +19,7 @@
#include "chrome/browser/ui/collected_cookies_infobar_delegate.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/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -184,7 +186,7 @@ void CollectedCookiesMac::OnSheetDidEnd(NSWindow* sheet) {
// Change the label of the blocked cookies part if necessary.
Profile* profile = wrapper_->profile();
- if (profile->GetHostContentSettingsMap()->BlockThirdPartyCookies()) {
+ if (profile->GetPrefs()->GetBoolean(prefs::kBlockThirdPartyCookies)) {
[blockedCookiesText_ setStringValue:l10n_util::GetNSString(
IDS_COLLECTED_COOKIES_BLOCKED_THIRD_PARTY_BLOCKING_ENABLED)];
CGFloat textDeltaY = [GTMUILocalizerAndLayoutTweaker
@@ -244,7 +246,7 @@ void CollectedCookiesMac::OnSheetDidEnd(NSWindow* sheet) {
Profile* profile = wrapper_->profile();
CookieTreeOriginNode* origin_node =
static_cast<CookieTreeOriginNode*>(cookie);
- origin_node->CreateContentException(profile->GetHostContentSettingsMap(),
+ origin_node->CreateContentException(CookieSettings::GetForProfile(profile),
setting);
if (!lastDomain.empty())
multipleDomainsChanged = YES;

Powered by Google App Engine
This is Rietveld 408576698