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

Unified Diff: chrome/browser/android/preferences/website_preference_bridge.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: chrome/browser/android/preferences/website_preference_bridge.cc
diff --git a/chrome/browser/android/preferences/website_preference_bridge.cc b/chrome/browser/android/preferences/website_preference_bridge.cc
index 070514a98cd9249014f6ded70a41d745b7c55377..7e106b993d04c772b2abdb78e983b7b472c19bbc 100644
--- a/chrome/browser/android/preferences/website_preference_bridge.cc
+++ b/chrome/browser/android/preferences/website_preference_bridge.cc
@@ -471,8 +471,10 @@ static void SetCookieSettingForOrigin(JNIEnv* env,
GetCookieSettings()->ResetCookieSetting(primary_pattern, secondary_pattern);
} else {
setting = value ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK;
- GetCookieSettings()->SetCookieSetting(primary_pattern, secondary_pattern,
- setting);
+ Profile* profile = ProfileManager::GetActiveUserProfile();
+ HostContentSettingsMapFactory::GetForProfile(profile)->SetContentSetting(
+ primary_pattern, secondary_pattern, CONTENT_SETTINGS_TYPE_COOKIES,
+ std::string(), setting);
raymes 2016/03/16 03:24:11 I wonder if we should add a function to GetCookieS
lshang 2016/03/17 01:53:59 Done.
}
WebSiteSettingsUmaUtil::LogPermissionChange(
CONTENT_SETTINGS_TYPE_NOTIFICATIONS, setting);
raymes 2016/03/16 03:24:11 nit: this looks wrong!
lshang 2016/03/17 01:53:59 Done.⊙▂⊙

Powered by Google App Engine
This is Rietveld 408576698