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

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: 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
« no previous file with comments | « chrome/browser/cookies_tree_model.h ('k') | chrome/browser/cookies_tree_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cookies_tree_model.cc
diff --git a/chrome/browser/cookies_tree_model.cc b/chrome/browser/cookies_tree_model.cc
index 002b8e7d675b9c3bc18e1f7dc801edb5d89940b8..348ee09ab4314521d68223bed02ae89ec39e3f6b 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,17 @@ 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_),
+ ContentSettingsPattern::Wildcard());
+ cookie_settings->SetCookieSetting(
+ ContentSettingsPattern::FromURL(url_),
+ ContentSettingsPattern::Wildcard(), setting);
}
}
« no previous file with comments | « chrome/browser/cookies_tree_model.h ('k') | chrome/browser/cookies_tree_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698