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

Unified Diff: chrome/browser/renderer_host/chrome_render_message_filter.cc

Issue 7008025: Apply third party cookie blocking to all kinds of cookies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 7 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/renderer_host/chrome_render_message_filter.cc
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc
index 6f7170105da1b46b30c1a224ca81a4e8b86f0ed7..2ef39ebd2b46ec73e82759973bfd450388e04bf7 100644
--- a/chrome/browser/renderer_host/chrome_render_message_filter.cc
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc
@@ -334,8 +334,8 @@ void ChromeRenderMessageFilter::OnAllowDatabase(int render_view_id,
const string16& name,
const string16& display_name,
bool* allowed) {
- ContentSetting setting = host_content_settings_map_->GetContentSetting(
- origin_url, CONTENT_SETTINGS_TYPE_COOKIES, "");
+ ContentSetting setting = host_content_settings_map_->GetCookieContentSetting(
+ origin_url, top_origin_url, true);
DCHECK((setting == CONTENT_SETTING_ALLOW) ||
(setting == CONTENT_SETTING_BLOCK) ||
(setting == CONTENT_SETTING_SESSION_ONLY));
@@ -354,8 +354,8 @@ void ChromeRenderMessageFilter::OnAllowDOMStorage(int render_view_id,
const GURL& top_origin_url,
DOMStorageType type,
bool* allowed) {
- ContentSetting setting = host_content_settings_map_->GetContentSetting(
- origin_url, CONTENT_SETTINGS_TYPE_COOKIES, "");
+ ContentSetting setting = host_content_settings_map_->GetCookieContentSetting(
+ origin_url, top_origin_url, true);
*allowed = setting != CONTENT_SETTING_BLOCK;
// If content was blocked, tell the UI to display the blocked content icon.
BrowserThread::PostTask(
@@ -371,8 +371,8 @@ void ChromeRenderMessageFilter::OnAllowFileSystem(int render_view_id,
bool* allowed) {
// TODO(kinuko): Need to notify the UI thread to indicate that
// there's a blocked content. See the above for inspiration.
- ContentSetting setting = host_content_settings_map_->GetContentSetting(
- origin_url, CONTENT_SETTINGS_TYPE_COOKIES, "");
+ ContentSetting setting = host_content_settings_map_->GetCookieContentSetting(
+ origin_url, top_origin_url, true);
DCHECK((setting == CONTENT_SETTING_ALLOW) ||
(setting == CONTENT_SETTING_BLOCK) ||
(setting == CONTENT_SETTING_SESSION_ONLY));
@@ -384,8 +384,8 @@ void ChromeRenderMessageFilter::OnAllowIndexedDB(int render_view_id,
const GURL& top_origin_url,
const string16& name,
bool* allowed) {
- ContentSetting setting = host_content_settings_map_->GetContentSetting(
- origin_url, CONTENT_SETTINGS_TYPE_COOKIES, "");
+ ContentSetting setting = host_content_settings_map_->GetCookieContentSetting(
+ origin_url, top_origin_url, true);
*allowed = setting != CONTENT_SETTING_BLOCK;
BrowserThread::PostTask(
« no previous file with comments | « chrome/browser/cookies_tree_model_unittest.cc ('k') | chrome/browser/ui/content_settings/content_setting_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698