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

Unified Diff: components/content_settings/core/browser/cookie_settings.cc

Issue 1694063002: Use GURLS instead of patterns in SetCookieSetting() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scoping_set_content_setting
Patch Set: fix bug in android Created 4 years, 9 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: components/content_settings/core/browser/cookie_settings.cc
diff --git a/components/content_settings/core/browser/cookie_settings.cc b/components/content_settings/core/browser/cookie_settings.cc
index 2339c86cddd95e1b8fb4ddcb39456082a69b8776..9eec0207d5827d82f6dc816ed1804e87e65ebbda 100644
--- a/components/content_settings/core/browser/cookie_settings.cc
+++ b/components/content_settings/core/browser/cookie_settings.cc
@@ -92,17 +92,12 @@ void CookieSettings::SetDefaultCookieSetting(ContentSetting setting) {
CONTENT_SETTINGS_TYPE_COOKIES, setting);
}
-void CookieSettings::SetCookieSetting(
- const ContentSettingsPattern& primary_pattern,
- const ContentSettingsPattern& secondary_pattern,
- ContentSetting setting) {
+void CookieSettings::SetCookieSetting(const GURL& primary_url,
+ ContentSetting setting) {
DCHECK(IsValidSetting(setting));
- if (setting == CONTENT_SETTING_SESSION_ONLY) {
- DCHECK(secondary_pattern == ContentSettingsPattern::Wildcard());
- }
- host_content_settings_map_->SetContentSetting(
- primary_pattern, secondary_pattern, CONTENT_SETTINGS_TYPE_COOKIES,
- std::string(), setting);
+ host_content_settings_map_->SetContentSettingDefaultScope(
+ primary_url, GURL(), CONTENT_SETTINGS_TYPE_COOKIES, std::string(),
+ setting);
}
void CookieSettings::ResetCookieSetting(

Powered by Google App Engine
This is Rietveld 408576698