Commit 97d5a240 authored by Marcin Wiacek's avatar Marcin Wiacek Committed by Commit Bot

Fix for displaying ContentSettingException in one Settings screen path

This patch is fixing change made with the
https://chromium-review.googlesource.com/c/chromium/src/+/1097408.

Before patch: ContentSettingException permissions are not displayed.

After patch: ContentSettingException are visible.

Affected path: Settings->Site Settings->(setting)->(exception site)

BUG=865032

Change-Id: I35dffa8c071fae4f4e76c69850b542b747dc493e
Reviewed-on: https://chromium-review.googlesource.com/1145434Reviewed-by: default avatarBernhard Bauer <bauerb@chromium.org>
Commit-Queue: Marcin Wiącek <marcin@mwiacek.com>
Cr-Commit-Position: refs/heads/master@{#577135}
parent 2c47ce6a
......@@ -192,11 +192,11 @@ public class SingleWebsitePreferences extends PreferenceFragment
// This loop looks expensive, but the amount of data is likely to be relatively small
// because most sites have very few permissions.
for (Website other : websites) {
if (merged.getContentSettingPermission(ContentSettingException.Type.ADS) == null
&& other.getContentSettingPermission(ContentSettingException.Type.ADS) != null
if (merged.getContentSettingException(ContentSettingException.Type.ADS) == null
&& other.getContentSettingException(ContentSettingException.Type.ADS) != null
&& other.compareByAddressTo(merged) == 0) {
merged.setContentSettingPermission(ContentSettingException.Type.ADS,
other.getContentSettingPermission(ContentSettingException.Type.ADS));
merged.setContentSettingException(ContentSettingException.Type.ADS,
other.getContentSettingException(ContentSettingException.Type.ADS));
}
for (@PermissionInfo.Type int type = 0; type < PermissionInfo.Type.NUM_ENTRIES;
type++) {
......@@ -230,10 +230,10 @@ public class SingleWebsitePreferences extends PreferenceFragment
|| type == ContentSettingException.Type.COOKIE) {
continue;
}
if (merged.getContentSettingPermission(type) == null
&& other.getContentSettingPermission(type) != null) {
merged.setContentSettingPermission(
type, other.getContentSettingPermission(type));
if (merged.getContentSettingException(type) == null
&& other.getContentSettingException(type) != null) {
merged.setContentSettingException(
type, other.getContentSettingException(type));
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment