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

Unified Diff: chrome/browser/cookies_tree_model.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/cookies_tree_model.cc
diff --git a/chrome/browser/cookies_tree_model.cc b/chrome/browser/cookies_tree_model.cc
index 90fbdaa2067a89620d2425993928cf104c91882f..c28bfe8ab2e9a451f12052136ce69c103b8e7247 100644
--- a/chrome/browser/cookies_tree_model.cc
+++ b/chrome/browser/cookies_tree_model.cc
@@ -15,7 +15,7 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browsing_data_cookie_helper.h"
-#include "chrome/browser/content_settings/host_content_settings_map.h"
+#include "chrome/browser/content_settings/cookie_settings.h"
#include "chrome/browser/extensions/extension_service.h"
#include "content/browser/in_process_webkit/webkit_context.h"
#include "grit/generated_resources.h"
@@ -453,13 +453,15 @@ CookieTreeQuotaNode* CookieTreeOriginNode::UpdateOrCreateQuotaNode(
}
void CookieTreeOriginNode::CreateContentException(
- HostContentSettingsMap* content_settings, ContentSetting setting) const {
+ CookieSettings* cookie_settings, ContentSetting setting) const {
+ DCHECK(setting == CONTENT_SETTING_ALLOW ||
+ setting == CONTENT_SETTING_BLOCK ||
+ setting == CONTENT_SETTING_SESSION_ONLY);
if (CanCreateContentException()) {
- content_settings->AddExceptionForURL(url_,
- url_,
- CONTENT_SETTINGS_TYPE_COOKIES,
- "",
- setting);
+ cookie_settings->ResetCookieSetting(
+ ContentSettingsPattern::FromURLNoWildcard(url_));
+ cookie_settings->SetCookieSetting(
+ ContentSettingsPattern::FromURL(url_), setting);
}
}

Powered by Google App Engine
This is Rietveld 408576698