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

Unified Diff: chrome/browser/content_settings/host_content_settings_map.cc

Issue 8051030: Changing third-party cookie blocking: strict by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/content_settings/host_content_settings_map.cc
diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc
index f05ef0acdc5b38d317b108dac41eff3454b53e6f..45d58550f7d36c1f4fc7c217deb996ce41e8ef82 100644
--- a/chrome/browser/content_settings/host_content_settings_map.cc
+++ b/chrome/browser/content_settings/host_content_settings_map.cc
@@ -208,11 +208,8 @@ ContentSetting HostContentSettingsMap::GetCookieContentSetting(
// If no explicit exception has been made and third-party cookies are blocked
// by default, apply that rule.
if (setting == CONTENT_SETTING_DEFAULT && BlockThirdPartyCookies()) {
- bool strict = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kBlockReadingThirdPartyCookies);
- net::StaticCookiePolicy policy(strict ?
- net::StaticCookiePolicy::BLOCK_ALL_THIRD_PARTY_COOKIES :
- net::StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES);
+ net::StaticCookiePolicy policy(
+ net::StaticCookiePolicy::BLOCK_ALL_THIRD_PARTY_COOKIES);
jochen (gone - plz use gerrit) 2011/09/28 07:46:48 I think it would be preferable to keep a pref so y
int rv;
if (setting_cookie)
rv = policy.CanSetCookie(url, first_party_url);
@@ -593,8 +590,11 @@ void HostContentSettingsMap::MigrateObsoleteCookiePref() {
CONTENT_SETTING_BLOCK : CONTENT_SETTING_ALLOW);
}
if (!prefs_->HasPrefPath(prefs::kBlockThirdPartyCookies)) {
- SetBlockThirdPartyCookies(cookie_behavior ==
- net::StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES);
+ SetBlockThirdPartyCookies(
+ cookie_behavior ==
+ net::StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES ||
+ cookie_behavior ==
+ net::StaticCookiePolicy::BLOCK_ALL_THIRD_PARTY_COOKIES);
jochen (gone - plz use gerrit) 2011/09/28 07:46:48 we don't write this pref key, so it should never b
}
}
}
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/content_settings/host_content_settings_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698