Add missing patches

This commit is contained in:
csagan5 2021-12-03 01:23:23 +01:00
parent 820e23fb3d
commit 8b9c14c8b7
8 changed files with 12103 additions and 80 deletions

View file

@ -1,3 +1,4 @@
Disable-third-party-cookies-by-default.patch
AV1-codec-support.patch
Switch-to-fstack-protector-strong.patch
Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
@ -116,6 +117,7 @@ Disable-the-DIAL-repeating-discovery.patch
Block-qjz9zk-or-trk-requests.patch
Hardening-against-incognito-mode-detection.patch
Remove-weblayer-dependency-on-Play-Services.patch
Timezone-customization.patch
Move-some-account-settings-back-to-privacy-settings.patch
Restore-Simplified-NTP-launch.patch
Add-option-to-use-home-page-as-NTP.patch
@ -157,6 +159,7 @@ Add-custom-tab-intents-privacy-option.patch
Enable-share-intent.patch
Site-setting-for-images.patch
Bromite-auto-updater.patch
Experimental-user-scripts-support.patch
Enable-native-Android-autofill.patch
Keep-empty-tabs-between-sessions.patch
Disable-third-party-origin-trials.patch

View file

@ -4409,10 +4409,10 @@ index de05ded0fa8d8..1938e2116a685 100644
"""
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index ae3adcf47ea15..ceb2810f56042 100644
index d1ec95b1f7d30..f6802be8e47ba 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3818,7 +3818,7 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3819,7 +3819,7 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kSyncSandboxDescription, kOsAll,
SINGLE_VALUE_TYPE_AND_VALUE(
switches::kSyncServiceURL,
@ -4421,7 +4421,7 @@ index ae3adcf47ea15..ceb2810f56042 100644
#if !defined(OS_ANDROID)
{"media-router-cast-allow-all-ips",
flag_descriptions::kMediaRouterCastAllowAllIPsName,
@@ -4050,7 +4050,7 @@ const FeatureEntry kFeatureEntries[] = {
@@ -4051,7 +4051,7 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kSetMarketUrlForTestingName,
flag_descriptions::kSetMarketUrlForTestingDescription, kOsAndroid,
SINGLE_VALUE_TYPE_AND_VALUE(switches::kMarketUrlForTesting,
@ -5764,7 +5764,7 @@ index f56e60a05897b..565dd568f596c 100644
// The maximum number of retries for the SimpleURLLoader requests.
const size_t kMaxRetries = 1;
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 6b489b8614b24..6f29ebd320601 100644
index 078b188b7e077..2e900680297d3 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -205,7 +205,7 @@ const char kU2FPermissionPromptDescription[] =

View file

@ -0,0 +1,23 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed, 11 Oct 2017 22:50:10 +0200
Subject: Disable third-party cookies by default
---
components/content_settings/core/browser/cookie_settings.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/content_settings/core/browser/cookie_settings.cc b/components/content_settings/core/browser/cookie_settings.cc
--- a/components/content_settings/core/browser/cookie_settings.cc
+++ b/components/content_settings/core/browser/cookie_settings.cc
@@ -63,7 +63,7 @@ void CookieSettings::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterIntegerPref(
prefs::kCookieControlsMode,
- static_cast<int>(CookieControlsMode::kIncognitoOnly),
+ static_cast<int>(CookieControlsMode::kBlockThirdParty),
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
}
--
2.20.1

View file

@ -28,7 +28,7 @@ See also: https://github.com/bromite/bromite/issues/547
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -415,6 +415,7 @@ android_library("chrome_java") {
@@ -419,6 +419,7 @@ android_library("chrome_java") {
"//chrome/browser/xsurface:java",
"//components/autofill/android:autofill_java",
"//components/autofill_assistant/browser:proto_java",

File diff suppressed because it is too large Load diff

View file

@ -42,10 +42,10 @@ Subject: Revert the removal of an option to block autoplay
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-xxxhdpi/settings_autoplay.png
diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn
index 624ba958356ba..216eb2c2381ef 100644
index d6cba78972382..ea78c679219ac 100644
--- a/components/browser_ui/site_settings/android/BUILD.gn
+++ b/components/browser_ui/site_settings/android/BUILD.gn
@@ -145,6 +145,11 @@ android_resources("java_resources") {
@@ -146,6 +146,11 @@ android_resources("java_resources") {
"java/res/drawable-xxxhdpi/permission_protected_media.png",
"java/res/drawable-xxxhdpi/settings_sensors.png",
"java/res/drawable-xxxhdpi/web_asset.png",
@ -166,10 +166,10 @@ literal 0
HcmV?d00001
diff --git a/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml b/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml
index 31260c27852a3..7bae9b4f3afcc 100644
index beb3ee433ee3b..1cedae5d0dd21 100644
--- a/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml
+++ b/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml
@@ -61,6 +61,10 @@
@@ -65,6 +65,10 @@
<org.chromium.components.browser_ui.settings.ChromeBasePreference
android:fragment="org.chromium.components.browser_ui.site_settings.SingleCategorySettings"
android:key="protected_content" />
@ -181,7 +181,7 @@ index 31260c27852a3..7bae9b4f3afcc 100644
<org.chromium.components.browser_ui.settings.ChromeBasePreference
android:fragment="org.chromium.components.browser_ui.site_settings.SingleCategorySettings"
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
index 04379683aa48b..a78f79463e044 100644
index 52533463e9fc1..79b9378da083d 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
@@ -113,7 +113,10 @@ public class ContentSettingsResources {
@ -197,10 +197,10 @@ index 04379683aa48b..a78f79463e044 100644
return new ResourceItem(R.drawable.ic_brightness_medium_24dp,
R.drawable.ic_brightness_medium_20dp, R.string.auto_dark_web_content_title,
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java
index 2f289db26c670..6440e0ff63271 100644
index bf6fccd181179..935f7a2f3bd1f 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java
@@ -567,6 +567,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
@@ -586,6 +586,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
int resource = 0;
if (mCategory.showSites(SiteSettingsCategory.Type.AUTOMATIC_DOWNLOADS)) {
resource = R.string.website_settings_add_site_description_automatic_downloads;
@ -209,7 +209,7 @@ index 2f289db26c670..6440e0ff63271 100644
} else if (mCategory.showSites(SiteSettingsCategory.Type.BACKGROUND_SYNC)) {
resource = R.string.website_settings_add_site_description_background_sync;
} else if (mCategory.showSites(SiteSettingsCategory.Type.JAVASCRIPT)) {
@@ -680,6 +682,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
@@ -708,6 +710,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
boolean exception = false;
if (mCategory.showSites(SiteSettingsCategory.Type.SOUND)) {
exception = true;
@ -219,7 +219,7 @@ index 2f289db26c670..6440e0ff63271 100644
exception = true;
} else if (mCategory.showSites(SiteSettingsCategory.Type.COOKIES)) {
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
index 046bf481a685c..78c8579eb9c6c 100644
index e4a08578f18df..ff492e0e00c77 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
@@ -119,6 +119,8 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
@ -231,7 +231,7 @@ index 046bf481a685c..78c8579eb9c6c 100644
case ContentSettingsType.IDLE_DETECTION:
return "idle_detection_permission_list";
case ContentSettingsType.JAVASCRIPT:
@@ -483,6 +485,8 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
@@ -485,6 +487,8 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
if (type == ContentSettingsType.ADS) {
setUpAdsPreference(preference);
@ -240,7 +240,7 @@ index 046bf481a685c..78c8579eb9c6c 100644
} else if (type == ContentSettingsType.SOUND) {
setUpSoundPreference(preference);
} else if (type == ContentSettingsType.JAVASCRIPT) {
@@ -971,6 +975,24 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
@@ -975,6 +979,24 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
setupContentSettingsPreference(preference, currentValue, false /* isEmbargoed */);
}
@ -266,32 +266,32 @@ index 046bf481a685c..78c8579eb9c6c 100644
BrowserContextHandle browserContextHandle =
getSiteSettingsDelegate().getBrowserContextHandle();
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
index 801c2454e2984..65aa0fd8899db 100644
index 435b5037ceb43..cbb425c4bb946 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
@@ -42,7 +42,7 @@ public class SiteSettingsCategory {
Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION,
@@ -43,7 +43,7 @@ public class SiteSettingsCategory {
Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS,
Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY,
- Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE})
+ Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.AUTOPLAY})
Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE,
- Type.TIMEZONE_OVERRIDE})
+ Type.TIMEZONE_OVERRIDE, Type.AUTOPLAY})
@Retention(RetentionPolicy.SOURCE)
public @interface Type {
// All updates here must also be reflected in {@link #preferenceKey(int)
@@ -72,10 +72,11 @@ public class SiteSettingsCategory {
int USE_STORAGE = 22;
@@ -74,10 +74,11 @@ public class SiteSettingsCategory {
int AUTO_DARK_WEB_CONTENT = 23;
int REQUEST_DESKTOP_SITE = 24;
+ int AUTOPLAY = 25;
int TIMEZONE_OVERRIDE = 25;
+ int AUTOPLAY = 26;
/**
* Number of handled categories used for calculating array sizes.
*/
- int NUM_ENTRIES = 25;
+ int NUM_ENTRIES = 26;
- int NUM_ENTRIES = 26;
+ int NUM_ENTRIES = 27;
}
private final BrowserContextHandle mBrowserContextHandle;
@@ -186,6 +187,8 @@ public class SiteSettingsCategory {
@@ -188,6 +189,8 @@ public class SiteSettingsCategory {
return ContentSettingsType.NFC;
case Type.NOTIFICATIONS:
return ContentSettingsType.NOTIFICATIONS;
@ -300,7 +300,7 @@ index 801c2454e2984..65aa0fd8899db 100644
case Type.POPUPS:
return ContentSettingsType.POPUPS;
case Type.PROTECTED_MEDIA:
@@ -262,6 +265,8 @@ public class SiteSettingsCategory {
@@ -266,6 +269,8 @@ public class SiteSettingsCategory {
return "nfc";
case Type.NOTIFICATIONS:
return "notifications";
@ -310,7 +310,7 @@ index 801c2454e2984..65aa0fd8899db 100644
return "popups";
case Type.PROTECTED_MEDIA:
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java
index fa69c4b50b536..8d0c56709ab3d 100644
index b9931fc4cfdf6..cfe33f8df1e4e 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java
@@ -216,6 +216,14 @@ public final class Website implements Serializable {
@ -329,7 +329,7 @@ index fa69c4b50b536..8d0c56709ab3d 100644
// It is possible to set the permission without having an existing exception,
// because we always show the sound permission in Site Settings.
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java
index 9523dcca60d51..5a2c743b245f3 100644
index 6219383231f75..52b2ae69b4493 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java
@@ -61,6 +61,7 @@ public class WebsitePermissionsFetcher {
@ -341,7 +341,7 @@ index 9523dcca60d51..5a2c743b245f3 100644
case ContentSettingsType.REQUEST_DESKTOP_SITE:
case ContentSettingsType.JAVASCRIPT:
diff --git a/components/browser_ui/site_settings/android/website_preference_bridge.cc b/components/browser_ui/site_settings/android/website_preference_bridge.cc
index ee7d9bf53f8d3..f0aaa0ffd23e8 100644
index 6d6e4c1373b83..855b7740343c0 100644
--- a/components/browser_ui/site_settings/android/website_preference_bridge.cc
+++ b/components/browser_ui/site_settings/android/website_preference_bridge.cc
@@ -820,6 +820,7 @@ static void JNI_WebsitePreferenceBridge_SetContentSettingEnabled(
@ -353,7 +353,7 @@ index ee7d9bf53f8d3..f0aaa0ffd23e8 100644
break;
default:
diff --git a/components/browser_ui/strings/android/site_settings.grdp b/components/browser_ui/strings/android/site_settings.grdp
index 9a03fda430baa..35c484f1f74b1 100644
index 1ba79aa78394d..19f8f9e646163 100644
--- a/components/browser_ui/strings/android/site_settings.grdp
+++ b/components/browser_ui/strings/android/site_settings.grdp
@@ -12,6 +12,15 @@
@ -373,7 +373,7 @@ index 9a03fda430baa..35c484f1f74b1 100644
Augmented reality
</message>
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
index 336b5498e3ff4..6de84a2e75ca0 100644
index d90f46d6806dc..ca9cb7afb1d8e 100644
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -313,7 +313,7 @@ void ContentSettingsRegistry::Init() {
@ -386,7 +386,7 @@ index 336b5498e3ff4..6de84a2e75ca0 100644
ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK),
WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE,
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
index 75473709e0ee6..e26e3d099bd1c 100644
index dc99328a458a9..4c7c45c15d89e 100644
--- a/components/content_settings/core/browser/content_settings_utils.cc
+++ b/components/content_settings/core/browser/content_settings_utils.cc
@@ -152,6 +152,8 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
@ -397,9 +397,9 @@ index 75473709e0ee6..e26e3d099bd1c 100644
+ &(rules->autoplay_rules));
map->GetSettingsForOneType(ContentSettingsType::POPUPS,
&(rules->popup_redirect_rules));
}
diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
index 7006397be6f0d..49d322793d64e 100644
index be7fb3ebdcf3b..1d82d80c8a03b 100644
--- a/components/content_settings/core/common/content_settings.cc
+++ b/components/content_settings/core/common/content_settings.cc
@@ -187,6 +187,7 @@ bool RendererContentSettingRules::IsRendererContentSetting(
@ -411,7 +411,7 @@ index 7006397be6f0d..49d322793d64e 100644
content_type == ContentSettingsType::POPUPS ||
content_type == ContentSettingsType::MIXEDSCRIPT ||
diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h
index 135e07ab6c5d2..2721a8d0d2e93 100644
index 905833daa3ba1..5e4245af5e741 100644
--- a/components/content_settings/core/common/content_settings.h
+++ b/components/content_settings/core/common/content_settings.h
@@ -77,6 +77,7 @@ struct RendererContentSettingRules {
@ -423,7 +423,7 @@ index 135e07ab6c5d2..2721a8d0d2e93 100644
ContentSettingsForOneType mixed_content_rules;
ContentSettingsForOneType auto_dark_content_rules;
diff --git a/components/content_settings/core/common/content_settings.mojom b/components/content_settings/core/common/content_settings.mojom
index f2f3eba2167a2..1393eb5741925 100644
index 659646570aae2..93fc1ec5dd151 100644
--- a/components/content_settings/core/common/content_settings.mojom
+++ b/components/content_settings/core/common/content_settings.mojom
@@ -75,6 +75,7 @@ struct ContentSettingPatternSource {
@ -435,7 +435,7 @@ index f2f3eba2167a2..1393eb5741925 100644
array<ContentSettingPatternSource> mixed_content_rules;
array<ContentSettingPatternSource> auto_dark_content_rules;
diff --git a/components/content_settings/core/common/content_settings_mojom_traits.cc b/components/content_settings/core/common/content_settings_mojom_traits.cc
index 4ae7a3b123dc2..af71710b33e8d 100644
index e0268395cc200..b9bd816e67238 100644
--- a/components/content_settings/core/common/content_settings_mojom_traits.cc
+++ b/components/content_settings/core/common/content_settings_mojom_traits.cc
@@ -99,6 +99,7 @@ bool StructTraits<content_settings::mojom::RendererContentSettingRulesDataView,
@ -445,9 +445,9 @@ index 4ae7a3b123dc2..af71710b33e8d 100644
+ data.ReadAutoplayRules(&out->autoplay_rules) &&
data.ReadPopupRedirectRules(&out->popup_redirect_rules) &&
data.ReadMixedContentRules(&out->mixed_content_rules) &&
data.ReadAutoDarkContentRules(&out->auto_dark_content_rules);
data.ReadAutoDarkContentRules(&out->auto_dark_content_rules) &&
diff --git a/components/content_settings/core/common/content_settings_mojom_traits.h b/components/content_settings/core/common/content_settings_mojom_traits.h
index 7127ca7d852b6..66244e9875e43 100644
index 34993a32e4f23..1b209fd7d420f 100644
--- a/components/content_settings/core/common/content_settings_mojom_traits.h
+++ b/components/content_settings/core/common/content_settings_mojom_traits.h
@@ -135,6 +135,11 @@ struct StructTraits<
@ -463,10 +463,10 @@ index 7127ca7d852b6..66244e9875e43 100644
const RendererContentSettingRules& r) {
return r.popup_redirect_rules;
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
index c88d87dc4c5f0..defee1d9a7f31 100644
index 8a4119c3b432b..e93f2be7cb0eb 100644
--- a/components/content_settings/renderer/content_settings_agent_impl.cc
+++ b/components/content_settings/renderer/content_settings_agent_impl.cc
@@ -427,6 +427,17 @@ bool ContentSettingsAgentImpl::AllowRunningInsecureContent(
@@ -439,6 +439,17 @@ bool ContentSettingsAgentImpl::AllowRunningInsecureContent(
return false;
}
@ -485,7 +485,7 @@ index c88d87dc4c5f0..defee1d9a7f31 100644
if (!content_setting_rules_)
return default_value;
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
index e618979c959c3..3d833922010ef 100644
index b9f7c20a4f320..e5e617f5649dd 100644
--- a/components/content_settings/renderer/content_settings_agent_impl.h
+++ b/components/content_settings/renderer/content_settings_agent_impl.h
@@ -99,6 +99,7 @@ class ContentSettingsAgentImpl

View file

@ -33,10 +33,10 @@ Subject: Site setting for images
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-xxxhdpi/permission_images.png
diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn
index 216eb2c2381ef..ae17c85496092 100644
index ea78c679219ac..36bfd0553d944 100644
--- a/components/browser_ui/site_settings/android/BUILD.gn
+++ b/components/browser_ui/site_settings/android/BUILD.gn
@@ -112,6 +112,7 @@ android_resources("java_resources") {
@@ -113,6 +113,7 @@ android_resources("java_resources") {
sources = [
"java/res/drawable-hdpi/ic_volume_up_grey600_24dp.png",
"java/res/drawable-hdpi/permission_background_sync.png",
@ -44,7 +44,7 @@ index 216eb2c2381ef..ae17c85496092 100644
"java/res/drawable-hdpi/permission_javascript.png",
"java/res/drawable-hdpi/permission_popups.png",
"java/res/drawable-hdpi/permission_protected_media.png",
@@ -119,6 +120,7 @@ android_resources("java_resources") {
@@ -120,6 +121,7 @@ android_resources("java_resources") {
"java/res/drawable-hdpi/web_asset.png",
"java/res/drawable-mdpi/ic_volume_up_grey600_24dp.png",
"java/res/drawable-mdpi/permission_background_sync.png",
@ -52,7 +52,7 @@ index 216eb2c2381ef..ae17c85496092 100644
"java/res/drawable-mdpi/permission_javascript.png",
"java/res/drawable-mdpi/permission_popups.png",
"java/res/drawable-mdpi/permission_protected_media.png",
@@ -126,6 +128,7 @@ android_resources("java_resources") {
@@ -127,6 +129,7 @@ android_resources("java_resources") {
"java/res/drawable-mdpi/web_asset.png",
"java/res/drawable-xhdpi/ic_volume_up_grey600_24dp.png",
"java/res/drawable-xhdpi/permission_background_sync.png",
@ -60,7 +60,7 @@ index 216eb2c2381ef..ae17c85496092 100644
"java/res/drawable-xhdpi/permission_javascript.png",
"java/res/drawable-xhdpi/permission_popups.png",
"java/res/drawable-xhdpi/permission_protected_media.png",
@@ -133,6 +136,7 @@ android_resources("java_resources") {
@@ -134,6 +137,7 @@ android_resources("java_resources") {
"java/res/drawable-xhdpi/web_asset.png",
"java/res/drawable-xxhdpi/ic_volume_up_grey600_24dp.png",
"java/res/drawable-xxhdpi/permission_background_sync.png",
@ -68,7 +68,7 @@ index 216eb2c2381ef..ae17c85496092 100644
"java/res/drawable-xxhdpi/permission_javascript.png",
"java/res/drawable-xxhdpi/permission_popups.png",
"java/res/drawable-xxhdpi/permission_protected_media.png",
@@ -140,6 +144,7 @@ android_resources("java_resources") {
@@ -141,6 +145,7 @@ android_resources("java_resources") {
"java/res/drawable-xxhdpi/web_asset.png",
"java/res/drawable-xxxhdpi/ic_volume_up_grey600_24dp.png",
"java/res/drawable-xxxhdpi/permission_background_sync.png",
@ -159,7 +159,7 @@ literal 0
HcmV?d00001
diff --git a/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml b/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml
index 7bae9b4f3afcc..f237d3c39a11a 100644
index 1cedae5d0dd21..e2bc1755968ce 100644
--- a/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml
+++ b/components/browser_ui/site_settings/android/java/res/xml/site_settings_preferences.xml
@@ -41,6 +41,10 @@
@ -170,11 +170,11 @@ index 7bae9b4f3afcc..f237d3c39a11a 100644
+ <org.chromium.components.browser_ui.settings.ChromeBasePreference
+ android:key="images"
+ android:fragment="org.chromium.components.browser_ui.site_settings.SingleCategorySettings" />
<!-- Popups -->
<!-- Timezone Override -->
<org.chromium.components.browser_ui.settings.ChromeBasePreference
android:fragment="org.chromium.components.browser_ui.site_settings.SingleCategorySettings"
android:key="timezone_override"
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
index a78f79463e044..f74cf19b9475e 100644
index 79b9378da083d..476b04a3795fa 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
@@ -134,6 +134,10 @@ public class ContentSettingsResources {
@ -189,10 +189,10 @@ index a78f79463e044..f74cf19b9475e 100644
return new ResourceItem(R.drawable.settings_bluetooth, /*smallIcon=*/0,
R.string.website_settings_bluetooth, ContentSettingValues.ASK,
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java
index 6440e0ff63271..091e13aae5736 100644
index 935f7a2f3bd1f..b26d79df98978 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java
@@ -581,6 +581,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
@@ -600,6 +600,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
browserContextHandle, ContentSettingsType.SOUND)
? R.string.website_settings_add_site_description_sound_block
: R.string.website_settings_add_site_description_sound_allow;
@ -201,7 +201,7 @@ index 6440e0ff63271..091e13aae5736 100644
} else if (mCategory.showSites(SiteSettingsCategory.Type.COOKIES)) {
if (mRequiresFourStateSetting) {
resource = cookieSettingsExceptionShouldBlock()
@@ -686,6 +688,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
@@ -714,6 +716,8 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
exception = true;
} else if (mCategory.showSites(SiteSettingsCategory.Type.JAVASCRIPT)) {
exception = true;
@ -211,7 +211,7 @@ index 6440e0ff63271..091e13aae5736 100644
exception = true;
} else if (mCategory.showSites(SiteSettingsCategory.Type.BACKGROUND_SYNC)
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
index 78c8579eb9c6c..3386be1defb35 100644
index ff492e0e00c77..103c9923fc3b5 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java
@@ -123,6 +123,8 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
@ -223,7 +223,7 @@ index 78c8579eb9c6c..3386be1defb35 100644
case ContentSettingsType.JAVASCRIPT:
return "javascript_permission_list";
case ContentSettingsType.POPUPS:
@@ -493,6 +495,8 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
@@ -495,6 +497,8 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
setUpJavascriptPreference(preference);
} else if (type == ContentSettingsType.COOKIES) {
setUpCookiesPreference(preference);
@ -232,7 +232,7 @@ index 78c8579eb9c6c..3386be1defb35 100644
} else if (type == ContentSettingsType.GEOLOCATION) {
setUpLocationPreference(preference);
} else if (type == ContentSettingsType.NOTIFICATIONS) {
@@ -1060,6 +1064,24 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
@@ -1064,6 +1068,24 @@ public class SingleWebsiteSettings extends SiteSettingsPreferenceFragment
setupContentSettingsPreference(preference, permission, false /* isEmbargoed */);
}
@ -258,32 +258,32 @@ index 78c8579eb9c6c..3386be1defb35 100644
return value == ContentSettingValues.ALLOW
? getString(R.string.website_settings_permissions_allowed_dse)
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
index 65aa0fd8899db..fdd60ef3f2820 100644
index cbb425c4bb946..f6ad8557ca4bc 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
@@ -42,7 +42,7 @@ public class SiteSettingsCategory {
Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION,
@@ -43,7 +43,7 @@ public class SiteSettingsCategory {
Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS,
Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY,
- Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.AUTOPLAY})
+ Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.AUTOPLAY, Type.IMAGES})
Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE,
- Type.TIMEZONE_OVERRIDE, Type.AUTOPLAY})
+ Type.TIMEZONE_OVERRIDE, Type.AUTOPLAY, Type.IMAGES})
@Retention(RetentionPolicy.SOURCE)
public @interface Type {
// All updates here must also be reflected in {@link #preferenceKey(int)
@@ -73,10 +73,11 @@ public class SiteSettingsCategory {
int AUTO_DARK_WEB_CONTENT = 23;
@@ -75,10 +75,11 @@ public class SiteSettingsCategory {
int REQUEST_DESKTOP_SITE = 24;
int AUTOPLAY = 25;
+ int IMAGES = 26;
int TIMEZONE_OVERRIDE = 25;
int AUTOPLAY = 26;
+ int IMAGES = 27;
/**
* Number of handled categories used for calculating array sizes.
*/
- int NUM_ENTRIES = 26;
+ int NUM_ENTRIES = 27;
- int NUM_ENTRIES = 27;
+ int NUM_ENTRIES = 28;
}
private final BrowserContextHandle mBrowserContextHandle;
@@ -179,6 +180,8 @@ public class SiteSettingsCategory {
@@ -181,6 +182,8 @@ public class SiteSettingsCategory {
return ContentSettingsType.GEOLOCATION;
case Type.IDLE_DETECTION:
return ContentSettingsType.IDLE_DETECTION;
@ -292,7 +292,7 @@ index 65aa0fd8899db..fdd60ef3f2820 100644
case Type.JAVASCRIPT:
return ContentSettingsType.JAVASCRIPT;
case Type.MICROPHONE:
@@ -259,6 +262,8 @@ public class SiteSettingsCategory {
@@ -263,6 +266,8 @@ public class SiteSettingsCategory {
return "idle_detection";
case Type.JAVASCRIPT:
return "javascript";
@ -314,7 +314,7 @@ index f4a9d3db2a09c..0347dd0e38568 100644
ContentSettingsType.ADS,
ContentSettingsType.BACKGROUND_SYNC,
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java
index 8d0c56709ab3d..93c7922da5472 100644
index cfe33f8df1e4e..80d450d4aa3df 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java
@@ -200,6 +200,12 @@ public final class Website implements Serializable {
@ -331,7 +331,7 @@ index 8d0c56709ab3d..93c7922da5472 100644
// It is possible to set the permission without having an existing exception,
// because we show the javascript permission in Site Settings if javascript
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java
index 5a2c743b245f3..7fe5bc120fa68 100644
index 52b2ae69b4493..78aa09dbf178a 100644
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java
@@ -64,6 +64,7 @@ public class WebsitePermissionsFetcher {
@ -343,7 +343,7 @@ index 5a2c743b245f3..7fe5bc120fa68 100644
case ContentSettingsType.JAVASCRIPT_JIT:
case ContentSettingsType.POPUPS:
diff --git a/components/browser_ui/site_settings/android/website_preference_bridge.cc b/components/browser_ui/site_settings/android/website_preference_bridge.cc
index f0aaa0ffd23e8..3817a770ceee7 100644
index 855b7740343c0..6cdfe0ca2dcde 100644
--- a/components/browser_ui/site_settings/android/website_preference_bridge.cc
+++ b/components/browser_ui/site_settings/android/website_preference_bridge.cc
@@ -816,6 +816,7 @@ static void JNI_WebsitePreferenceBridge_SetContentSettingEnabled(
@ -355,7 +355,7 @@ index f0aaa0ffd23e8..3817a770ceee7 100644
case ContentSettingsType::POPUPS:
case ContentSettingsType::SENSORS:
diff --git a/components/browser_ui/strings/android/site_settings.grdp b/components/browser_ui/strings/android/site_settings.grdp
index 35c484f1f74b1..99fe74e63ba17 100644
index 19f8f9e646163..4f9b8d42ff18e 100644
--- a/components/browser_ui/strings/android/site_settings.grdp
+++ b/components/browser_ui/strings/android/site_settings.grdp
@@ -42,6 +42,9 @@
@ -368,7 +368,7 @@ index 35c484f1f74b1..99fe74e63ba17 100644
<message name="IDS_JAVASCRIPT_PERMISSION_TITLE" desc="Title of the permission to run javascript [CHAR_LIMIT=32]">
JavaScript
</message>
@@ -185,6 +188,9 @@
@@ -188,6 +191,9 @@
<message name="IDS_WEBSITE_SETTINGS_ADD_SITE_TOAST" desc="The toast shown when a new site has been added to the exception list.">
Site <ph name="SITE_NAME">%1$s<ex>google.com</ex></ph> added
</message>
@ -379,7 +379,7 @@ index 35c484f1f74b1..99fe74e63ba17 100644
Site URL
</message>
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
index 2d5914436ec6e..e20cf92723470 100644
index a1a312f0eed18..9867f47b21a7e 100644
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -143,7 +143,8 @@ void ContentSettingsRegistry::Init() {
@ -393,7 +393,7 @@ index 2d5914436ec6e..e20cf92723470 100644
ContentSettingsInfo::PERSISTENT,
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS);
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
index e26e3d099bd1c..cabd39f76db5d 100644
index 4c7c45c15d89e..ef4b47e7e39f3 100644
--- a/components/content_settings/core/browser/content_settings_utils.cc
+++ b/components/content_settings/core/browser/content_settings_utils.cc
@@ -133,13 +133,8 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,

File diff suppressed because it is too large Load diff