Chromium Code Reviews| 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.⊙▂⊙
|