add windows build patches

This commit is contained in:
Carmelo Messina
2022-10-13 13:58:07 +02:00
parent ab27a87552
commit d457ea214f
34 changed files with 5587 additions and 1 deletions
+34 -1
View File
@@ -211,4 +211,37 @@ Fix-WebWorker-requestAnimationFrame.patch
00Experimental-user-scripts-support--fixup--2.patch
00OpenSearch--miscellaneous--fixup-.patch
00Eyeo-Adblock.patch
00Eyeo-Adblock-Remove-Privacy-Issues.patch
00Eyeo-Adblock-Remove-Privacy-Issues.patch
00Add-an-always-incognito-mode--win-fixup-.patch
00Experimental-user-scripts-support--win-fixup-.patch
00Disable-safe-browsing--win-fixup-.patch
00ungoogled-chr--Disable-profile-avatar--win-fixup-.patch
00Add-a-proxy-configuration-page--win-fixup-.patch
00Add-bookmark-import-export-actions--win-fixup-.patch
00openH264--enable-ARM-ARM64-optimizati--win-fixup-.patch
00Add-flag-to-disable-IPv6-probes--win-fixup-.patch
00Remove-EV-certificates--win-fixup-.patch
00AImageReader-CFI-crash-mitigations--win-fixup-.patch
00Remove-binary-blob-integrations--win-fixup-.patch
00Enable-native-Android-autofill--win-fixup-.patch
00Remove-signin-and-sync-integrations--win-fixup-.patch
00Add-lifetime-options-for-permissions--win-fixup-.patch
00Disable-various-metrics--win-fixup-.patch
00Do-not-build-API-keys-infobar--win-fixup-.patch
00Revert-flags--remove-num-raster-thre--win-fixup-.patch
00Add-flag-to-configure-maximum-connecti--win-fixup-.patch
00Add-flag-to-disable-external-intent-re--win-fixup-.patch
00Restore-Search-Ready-Omnibox-flag--win-fixup-.patch
00Disable-requests-for-single-word-Omni--win-fixup-.patch
00Revert-the-removal-to-block-autoplay--win-fixup-.patch
00JIT-site-settings--win-fixup-.patch
00Timezone-customization--win-fixup-.patch
00Add-webGL-site-setting--win-fixup-.patch
00Add-webRTC-site-settings--win-fixup-.patch
00Viewport-Protection--win-fixup-.patch
00Eyeo-Adblock--win-fixup-.patch
00Content-settings-infrastructure--win-fixup-.patch
00ungoogled-chromium--no-special-hosts-d--win-fixup-.patch
00Client-hints-overrides--win-fixup-.patch
00Logcat-crash-reports-UI--win-fixup-.patch
00Fix-windows-build.patch
@@ -0,0 +1,26 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:36:56 +0000
Subject: AImageReader CFI crash mitigations (win fixup)
---
gpu/ipc/service/gpu_init.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
--- a/gpu/ipc/service/gpu_init.cc
+++ b/gpu/ipc/service/gpu_init.cc
@@ -624,10 +624,12 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
}
#endif // BUILDFLAG(IS_WIN)
+#if BUILDFLAG(IS_ANDROID)
// Disable AImageReader if the workaround is enabled.
if (gpu_feature_info_.IsWorkaroundEnabled(DISABLE_AIMAGEREADER)) {
base::android::AndroidImageReader::DisableSupport();
}
+#endif
if (gpu_feature_info_.status_values[GPU_FEATURE_TYPE_VULKAN] !=
kGpuFeatureStatusEnabled ||
--
2.25.1
@@ -0,0 +1,39 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 10:59:27 +0000
Subject: Add a proxy configuration page (win fixup)
---
chrome/browser/browser_resources.grd | 6 ++----
chrome/browser/extensions/api/proxy/proxy_api_helpers.cc | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -77,10 +77,8 @@
</if>
<!-- Bromite Proxy Configuration UI -->
- <if expr="is_android">
- <include name="IDR_PROXY_CONFIG_HTML" file="resources\proxy_config.html" flattenhtml="true" type="BINDATA" compress="gzip" />
- <include name="IDR_PROXY_CONFIG_JS" file="resources\proxy_config.js" type="BINDATA" compress="gzip" />
- </if>
+ <include name="IDR_PROXY_CONFIG_HTML" file="resources\proxy_config.html" flattenhtml="true" type="BINDATA" compress="gzip" />
+ <include name="IDR_PROXY_CONFIG_JS" file="resources\proxy_config.js" type="BINDATA" compress="gzip" />
<if expr="not is_android">
<!-- Page not available for guest. -->
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
--- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
@@ -380,7 +380,7 @@ std::unique_ptr<base::Value> CreateProxyConfigDict(
}
return std::make_unique<base::Value>(
ProxyConfigDictionary::CreateFixedServers(proxy_rules_string,
- bypass_list));
+ bypass_list, /*reverse_bypass*/false));
}
case ProxyPrefs::MODE_SYSTEM:
return std::make_unique<base::Value>(
--
2.25.1
@@ -0,0 +1,62 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 09:09:26 +0000
Subject: Add an always-incognito mode (win fixup)
---
.../browser/autocomplete/chrome_autocomplete_provider_client.cc | 2 ++
.../content_settings/host_content_settings_map_factory.cc | 2 ++
chrome/browser/history/history_tab_helper.cc | 2 ++
3 files changed, 6 insertions(+)
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
@@ -311,9 +311,11 @@ signin::IdentityManager* ChromeAutocompleteProviderClient::GetIdentityManager()
}
bool ChromeAutocompleteProviderClient::IsAlwaysIncognitoEnabled() const {
+#if BUILDFLAG(IS_ANDROID)
if (profile_->GetPrefs()->GetBoolean(prefs::kAlwaysIncognitoEnabled)) {
return true;
}
+#endif
return false;
}
diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.cc b/chrome/browser/content_settings/host_content_settings_map_factory.cc
--- a/chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -100,6 +100,7 @@ scoped_refptr<RefcountedKeyedService>
bool always_incognito_enabled = false;
bool force_save_site_settings = false;
+#if BUILDFLAG(IS_ANDROID)
PrefService* prefService = original_profile->GetPrefs();
if (prefService->GetBoolean(prefs::kAlwaysIncognitoEnabled)) {
always_incognito_enabled = true;
@@ -109,6 +110,7 @@ scoped_refptr<RefcountedKeyedService>
profile = original_profile;
force_save_site_settings = true;
}
+#endif
scoped_refptr<HostContentSettingsMap> settings_map(new HostContentSettingsMap(
profile->GetPrefs(),
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
--- a/chrome/browser/history/history_tab_helper.cc
+++ b/chrome/browser/history/history_tab_helper.cc
@@ -429,10 +429,12 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() {
// static
void HistoryTabHelper::RegisterProfilePrefs(PrefRegistrySimple* registry) {
+#if BUILDFLAG(IS_ANDROID)
registry->RegisterBooleanPref(prefs::kIncognitoTabHistoryEnabled,
/*default_value=*/false);
registry->RegisterBooleanPref(prefs::kIncognitoSaveSiteSettingEnabled,
/*default_value=*/false);
+#endif
}
void HistoryTabHelper::WebContentsDestroyed() {
--
2.25.1
@@ -0,0 +1,109 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:30:34 +0000
Subject: Add bookmark import/export actions (win fixup)
---
chrome/browser/BUILD.gn | 2 ++
chrome/browser/about_flags.cc | 2 ++
chrome/browser/bookmarks/bookmark_html_writer.cc | 7 ++++++-
.../lib/browser/headless_select_file_dialog_factory.cc | 4 ++++
ui/shell_dialogs/select_file_dialog_win.cc | 5 +++++
5 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3588,6 +3588,8 @@ static_library("browser") {
"badging/badge_manager_factory.h",
"banners/app_banner_manager_desktop.cc",
"banners/app_banner_manager_desktop.h",
+ "bookmarks/bookmark_html_writer.cc",
+ "bookmarks/bookmark_html_writer.h",
"bookmarks/url_and_id.h",
"cart/cart_db.cc",
"cart/cart_db.h",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -8746,11 +8746,13 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(net::features::kIsCleartextPermitted)},
#endif
+#if BUILDFLAG(IS_ANDROID)
{"export-bookmarks-use-saf",
flag_descriptions::kBookmarksExportUseSafName,
flag_descriptions::kBookmarksExportUseSafDescription, kOsAndroid,
FEATURE_VALUE_TYPE(
chrome::android::kBookmarksExportUseSaf)},
+#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
{"snooping-protection", flag_descriptions::kSnoopingProtectionName,
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc
--- a/chrome/browser/bookmarks/bookmark_html_writer.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer.cc
@@ -27,7 +27,9 @@
#include "base/task/thread_pool.h"
#include "base/time/time.h"
#include "base/values.h"
+#if BUILDFLAG(IS_ANDROID)
#include "base/android/content_uri_utils.h"
+#endif
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -239,12 +241,15 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
// Opens the file, returning true on success.
bool OpenFile() {
int flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE;
+#if BUILDFLAG(IS_ANDROID)
if (path_.IsContentUri()) {
file_ = std::make_unique<base::File>(base::OpenContentUriForWrite(path_));
} else {
file_ = std::make_unique<base::File>(path_, flags);
}
-
+#else
+ file_ = std::make_unique<base::File>(path_, flags);
+#endif
if (!file_->IsValid()) {
PLOG(ERROR) << "Could not create " << path_;
return false;
diff --git a/headless/lib/browser/headless_select_file_dialog_factory.cc b/headless/lib/browser/headless_select_file_dialog_factory.cc
--- a/headless/lib/browser/headless_select_file_dialog_factory.cc
+++ b/headless/lib/browser/headless_select_file_dialog_factory.cc
@@ -54,6 +54,10 @@ class HeadlessSelectFileDialog : public ui::SelectFileDialog {
// ui::SelectFileDialog:
bool HasMultipleFileTypeChoicesImpl() override { return false; }
+ void ShowToast(const std::string& message) override {
+ // nothing to do, used only on android
+ }
+
SelectFileDialogCallback callback_;
};
diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/select_file_dialog_win.cc
--- a/ui/shell_dialogs/select_file_dialog_win.cc
+++ b/ui/shell_dialogs/select_file_dialog_win.cc
@@ -192,6 +192,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
int index);
bool HasMultipleFileTypeChoicesImpl() override;
+ void ShowToast(const std::string& message) override;
// Returns the filter to be used while displaying the open/save file dialog.
// This is computed from the extensions for the file types being opened.
@@ -269,6 +270,10 @@ bool SelectFileDialogImpl::HasMultipleFileTypeChoicesImpl() {
return has_multiple_file_type_choices_;
}
+void SelectFileDialogImpl::ShowToast(const std::string& message) {
+ // nothing to do, used only on android
+}
+
bool SelectFileDialogImpl::IsRunning(gfx::NativeWindow owning_window) const {
if (!owning_window->GetRootWindow())
return false;
--
2.25.1
@@ -0,0 +1,26 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 12:00:06 +0000
Subject: Add flag to configure maximum connecti (win fixup)
---
chrome/browser/about_flags.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1048,10 +1048,12 @@ const FeatureEntry::Choice kForceColorProfileChoices[] = {
switches::kForceDisplayColorProfile, "hdr10"},
};
+#if BUILDFLAG(IS_ANDROID)
const FeatureEntry::Choice kMaxConnectionsPerHostChoices[] = {
{features::kMaxConnectionsPerHostChoiceDefault, "", ""},
{features::kMaxConnectionsPerHostChoice15, switches::kMaxConnectionsPerHost, "15"},
};
+#endif
const FeatureEntry::Choice kMemlogModeChoices[] = {
{flags_ui::kGenericExperimentChoiceDisabled, "", ""},
--
2.25.1
@@ -0,0 +1,136 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:34:42 +0000
Subject: Add flag to disable IPv6 probes (win fixup)
---
chrome/browser/about_flags.cc | 2 +-
components/subresource_filter/tools/BUILD.gn | 6 ------
components/url_formatter/spoof_checks/top_domains/BUILD.gn | 3 +--
net/base/features.cc | 3 +++
net/base/features.h | 3 +++
net/dns/host_resolver_manager.cc | 2 +-
services/network/public/cpp/features.cc | 4 ----
services/network/public/cpp/features.h | 2 --
8 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -5790,7 +5790,7 @@ const FeatureEntry kFeatureEntries[] = {
{"ipv6-probing",
flag_descriptions::kIPv6ProbingName,
flag_descriptions::kIPv6ProbingDescription, kOsAll,
- FEATURE_VALUE_TYPE(network::features::kIPv6Probing)},
+ FEATURE_VALUE_TYPE(net::features::kIPv6Probing)},
#endif // BUILDFLAG(IS_ANDROID)
{"shopping-list", commerce::flag_descriptions::kShoppingListName,
diff --git a/components/subresource_filter/tools/BUILD.gn b/components/subresource_filter/tools/BUILD.gn
--- a/components/subresource_filter/tools/BUILD.gn
+++ b/components/subresource_filter/tools/BUILD.gn
@@ -50,8 +50,6 @@ if (!is_ios) {
deps = [
":tools_lib",
"//base",
- "//components/network_session_configurator/common",
- "//services/network/public/cpp"
]
}
@@ -63,8 +61,6 @@ if (!is_ios) {
":tools_lib",
"../core/common",
"//base",
- "//components/network_session_configurator/common",
- "//services/network/public/cpp",
]
}
@@ -74,8 +70,6 @@ if (!is_ios) {
"ruleset_converter:support",
"//base",
"//third_party/protobuf:protobuf_lite",
- "//components/network_session_configurator/common",
- "//services/network/public/cpp"
]
}
diff --git a/components/url_formatter/spoof_checks/top_domains/BUILD.gn b/components/url_formatter/spoof_checks/top_domains/BUILD.gn
--- a/components/url_formatter/spoof_checks/top_domains/BUILD.gn
+++ b/components/url_formatter/spoof_checks/top_domains/BUILD.gn
@@ -89,8 +89,7 @@ executable("make_top_domain_list_variables") {
"//base:i18n",
"//components/url_formatter/spoof_checks/common_words:common",
"//third_party/icu",
- "//components/network_session_configurator/common",
- "//services/network/public/cpp",
+ "//components/network_session_configurator/common"
]
if (is_ios) {
frameworks = [ "UIKit.framework" ]
diff --git a/net/base/features.cc b/net/base/features.cc
--- a/net/base/features.cc
+++ b/net/base/features.cc
@@ -57,6 +57,9 @@ const base::FeatureParam<std::string> kDnsHttpssvcControlDomains{
const base::FeatureParam<bool> kDnsHttpssvcControlDomainWildcard{
&kDnsHttpssvc, "DnsHttpssvcControlDomainWildcard", false};
+const base::Feature kIPv6Probing{"IPv6Probing",
+ base::FEATURE_ENABLED_BY_DEFAULT};
+
namespace dns_httpssvc_experiment {
base::TimeDelta GetExtraTimeAbsolute() {
DCHECK(base::FeatureList::IsEnabled(features::kDnsHttpssvc));
diff --git a/net/base/features.h b/net/base/features.h
--- a/net/base/features.h
+++ b/net/base/features.h
@@ -118,6 +118,9 @@ NET_EXPORT extern const base::FeatureParam<bool> kUseDnsHttpsSvcbHttpUpgrade;
NET_EXPORT extern const base::FeatureParam<bool>
kUseDnsHttpsSvcbEnforceSecureResponse;
+// Enable IPv6 ping probes to RIPE DNS.
+NET_EXPORT extern const base::Feature kIPv6Probing;
+
// Param to control whether HTTPS queries will be allowed via Insecure DNS
// (instead of just via Secure DNS).
NET_EXPORT extern const base::FeatureParam<bool> kUseDnsHttpsSvcbEnableInsecure;
diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
--- a/net/dns/host_resolver_manager.cc
+++ b/net/dns/host_resolver_manager.cc
@@ -4089,7 +4089,7 @@ bool HostResolverManager::IsIPv6Reachable(const NetLogWithSource& net_log) {
(tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
kIPv6ProbePeriodMs) {
- if (!base::FeatureList::IsEnabled(network::features::kIPv6Probing)) {
+ if (!base::FeatureList::IsEnabled(net::features::kIPv6Probing)) {
// pretend IPv6 connectivy probe is successful when probing is disabled
SetLastIPv6ProbeResult(true);
} else {
diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
--- a/services/network/public/cpp/features.cc
+++ b/services/network/public/cpp/features.cc
@@ -41,10 +41,6 @@ const base::Feature kReporting{"Reporting", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kThrottleDelayable{"ThrottleDelayable",
base::FEATURE_ENABLED_BY_DEFAULT};
-// Enable IPv6 ping probes to RIPE DNS.
-const base::Feature kIPv6Probing{"IPv6Probing",
- base::FEATURE_ENABLED_BY_DEFAULT};
-
// When kPriorityRequestsDelayableOnSlowConnections is enabled, HTTP
// requests fetched from a SPDY/QUIC/H2 proxies can be delayed by the
// ResourceScheduler just as HTTP/1.1 resources are. However, requests from such
diff --git a/services/network/public/cpp/features.h b/services/network/public/cpp/features.h
--- a/services/network/public/cpp/features.h
+++ b/services/network/public/cpp/features.h
@@ -18,8 +18,6 @@ extern const base::Feature kExpectCTReporting;
COMPONENT_EXPORT(NETWORK_CPP)
extern const base::Feature kNetworkErrorLogging;
COMPONENT_EXPORT(NETWORK_CPP)
-extern const base::Feature kIPv6Probing;
-COMPONENT_EXPORT(NETWORK_CPP)
extern const base::Feature kReporting;
COMPONENT_EXPORT(NETWORK_CPP)
extern const base::Feature kThrottleDelayable;
--
2.25.1
@@ -0,0 +1,25 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 12:00:43 +0000
Subject: Add flag to disable external intent re (win fixup)
---
chrome/browser/about_flags.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3395,9 +3395,11 @@ const FeatureEntry kFeatureEntries[] = {
{"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName,
flag_descriptions::kUiPartialSwapDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
+#if BUILDFLAG(IS_ANDROID)
{"disable-external-intent-requests", flag_descriptions::kDisableExternalIntentRequestsName,
flag_descriptions::kDisableExternalIntentRequestsDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE("disable-external-intent-requests")},
+#endif
{"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
--
2.25.1
@@ -0,0 +1,22 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:52:11 +0000
Subject: Add lifetime options for permissions (win fixup)
---
.../ui/views/permissions/permission_prompt_bubble_view.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/ui/views/permissions/permission_prompt_bubble_view.cc b/chrome/browser/ui/views/permissions/permission_prompt_bubble_view.cc
--- a/chrome/browser/ui/views/permissions/permission_prompt_bubble_view.cc
+++ b/chrome/browser/ui/views/permissions/permission_prompt_bubble_view.cc
@@ -410,7 +410,7 @@ void PermissionPromptBubbleView::AcceptPermission() {
void PermissionPromptBubbleView::AcceptPermissionThisTime() {
RecordDecision(permissions::PermissionAction::GRANTED_ONCE);
if (delegate_)
- delegate_->AcceptThisTime();
+ delegate_->AcceptThisTime(content_settings::LifetimeMode::Always);
}
void PermissionPromptBubbleView::DenyPermission() {
--
2.25.1
@@ -0,0 +1,252 @@
From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 08:12:18 +0000
Subject: Add webGL site setting (win fixup)
---
chrome/app/settings_strings.grdp | 19 ++++++++++++++++
chrome/browser/resources/settings/icons.html | 2 ++
.../settings/privacy_page/privacy_page.html | 22 +++++++++++++++++++
chrome/browser/resources/settings/route.ts | 1 +
.../resources/settings/settings_routes.ts | 1 +
.../site_settings/category_default_setting.ts | 1 +
.../settings/site_settings/constants.ts | 1 +
.../settings_category_default_radio_group.ts | 1 +
.../settings/site_settings/site_details.html | 5 +++++
.../recent_site_permissions.ts | 2 ++
.../site_settings_page/site_settings_page.ts | 9 ++++++++
.../views/page_info/page_info_view_factory.cc | 3 +++
.../settings_localized_strings_provider.cc | 7 ++++++
.../ui/webui/settings/site_settings_helper.cc | 1 +
.../core/browser/content_settings_registry.cc | 2 +-
15 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -3715,6 +3715,25 @@
Random Timezone override
</message>
+ <message name="IDS_SITE_SETTINGS_WEBGL_TITLE" desc="Description of the webgl content setting page title.">
+ Webgl
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_WEBGL_DESCRIPTION" desc="Description of the webgl content setting.">
+ Enable Webgl
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_WEBGL_ALLOWED" desc="Label for the enabled option of the Webgl setting.">
+ Webgl is enabled
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_WEBGL_BLOCKED" desc="Label for the disabled option of the Webgl setting.">
+ Webgl is disabled
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_WEBGL_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the webgl setting.">
+ Allowed to use webgl
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_WEBGL_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the webgl setting.">
+ Not allowed to use webgl
+ </message>
+
<if expr="not is_chromeos">
<!-- Import Settings Dialog -->
<message name="IDS_SETTINGS_IMPORT_SETTINGS_TITLE" desc="Dialog title for import dialog.">
diff --git a/chrome/browser/resources/settings/icons.html b/chrome/browser/resources/settings/icons.html
--- a/chrome/browser/resources/settings/icons.html
+++ b/chrome/browser/resources/settings/icons.html
@@ -174,6 +174,8 @@ NOTE: Chrome OS icons go in ./chromeos/os_icons.html.
<g id="javascript-jit-off"><path d="M19.17,12l-4.58-4.59L16,6l6,6l-3.59,3.59L17,14.17L19.17,12z M1.39,4.22l4.19,4.19L2,12l6,6l1.41-1.41L4.83,12L7,9.83 l12.78,12.78l1.41-1.41L2.81,2.81L1.39,4.22z"></path></g>
<g id="timezone-override"><path d="M21.72 11.33l-6.644-7.035a.97.97 0 0 0-1.38-.01l-1.67 1.72-1.617-1.712a.97.97 0 0 0-1.38-.01l-6.737 6.935c-.187.191-.29.447-.292.719-.002.272.099.529.28.722l6.644 7.034a.949.949 0 0 0 1.38.011l1.671-1.718 1.615 1.71a.949.949 0 0 0 1.381.01l6.74-6.935a1.054 1.054 0 0 0 .01-1.44zM6.947 12.464l3.657 3.785-.974.98-5.273-5.456 5.349-5.378.929.962-3.677 3.7a.998.998 0 0 0-.292.702 1 1 0 0 0 .28.705zm7.35 4.768l-.931-.963 3.68-3.7a1.012 1.012 0 0 0 .007-1.407l-3.656-3.784.974-.98 5.273 5.456-5.348 5.378z"></path></g>
<g id="timezone-override-off"><path d="M7.95,5.12l0.73-0.8C8.88,4.11,9.15,4,9.42,4c0.27,0,0.54,0.11,0.74,0.32L12,6.34l1.85-2.01C14.04,4.11,14.31,4,14.58,4 c0.27,0,0.54,0.11,0.74,0.32l6.42,7c0.35,0.38,0.35,0.97,0,1.35l-2.98,3.25l-1.42-1.42l2.3-2.51l-5.06-5.52l-1.23,1.34l3.21,3.51 c0.35,0.38,0.35,0.97,0,1.35l-0.51,0.56L7.95,5.12z M19.78,22.61l-3.73-3.73l-0.73,0.8c-0.2,0.22-0.47,0.32-0.74,0.32 c-0.27,0-0.54-0.11-0.74-0.32L12,17.66l-1.85,2.01C9.96,19.89,9.69,20,9.42,20c-0.27,0-0.54-0.11-0.74-0.32l-6.42-7 c-0.35-0.38-0.35-0.97,0-1.35l2.98-3.25L1.39,4.22l1.41-1.41l18.38,18.38L19.78,22.61z M10.64,16.18l-3.21-3.51 c-0.35-0.38-0.35-0.97,0-1.35l0.51-0.56L6.66,9.49L4.36,12l5.06,5.52L10.64,16.18z"></path></g>
+ <g id="webgl"><path d="M8 16h8v2H8v-2zm0-4h8v2H8v-2zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z" fill="#5F6368"></path></g>
+ <g id="webgl-off"><path d="M13.002 4.001H7.106L5.252 2.148c.232-.094.485-.147.75-.147h8l6 6v8.896l-2-2V9.001h-5v-5z" fill="#5F6368"></path><path d="M16.002 12.001h-.896l.896.896v-.896zM.6 3.45l1.414-1.414 19.94 19.94-1.414 1.414L.6 3.45zM3.986 20.01V6.84l2 2V20.01h11.172l1.765 1.766c-.28.15-.599.234-.937.234H5.976c-1.1 0-1.99-.9-1.99-2z" fill="#5F6368"></path><path d="M9.158 12.01H7.986v2h3.172l-2-2zM13.158 16.01H7.986v2h7.172l-2-2z" fill="#5F6368"></path></g>
</defs>
</svg>
</iron-iconset-svg>
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -1070,4 +1070,26 @@
</category-setting-exceptions>
</settings-subpage>
</template>
+ <template is="dom-if" route-path="/content/webgl" no-search>
+ <settings-subpage page-title="$i18n{siteSettingsWebgl}"
+ search-label="$i18n{siteSettingsAllSitesSearch}"
+ search-term="{{searchFilter_}}">
+ <div class="content-settings-header secondary">
+ $i18n{siteSettingsWebglDescription}
+ </div>
+ <settings-category-default-radio-group
+ category="[[contentSettingsTypesEnum_.WEBGL]]"
+ allow-option-label="$i18n{siteSettingsWebglAllowed}"
+ allow-option-icon="settings:webgl"
+ block-option-label="$i18n{siteSettingsWebglBlocked}"
+ block-option-icon="settings:webgl-off">
+ </settings-category-default-radio-group>
+ <category-setting-exceptions
+ category="[[contentSettingsTypesEnum_.WEBGL]]"
+ block-header="$i18n{siteSettingsWebglBlockedExceptions}"
+ allow-header="$i18n{siteSettingsWebglAllowedExceptions}"
+ search-filter="[[searchFilter_]]">
+ </category-setting-exceptions>
+ </settings-subpage>
+ </template>
</settings-animated-pages>
diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts
--- a/chrome/browser/resources/settings/route.ts
+++ b/chrome/browser/resources/settings/route.ts
@@ -105,6 +105,7 @@ function addPrivacyChildRoutes(r: Partial<SettingsRoutes>) {
r.SITE_SETTINGS_AUTOPLAY = r.SITE_SETTINGS.createChild('autoplay');
r.SITE_SETTINGS_JAVASCRIPT_JIT = r.SITE_SETTINGS.createChild('javascript-jit');
r.SITE_SETTINGS_TIMEZONE_OVERRIDE = r.SITE_SETTINGS.createChild('timezone-override');
+ r.SITE_SETTINGS_WEBGL = r.SITE_SETTINGS.createChild('webgl');
}
/**
diff --git a/chrome/browser/resources/settings/settings_routes.ts b/chrome/browser/resources/settings/settings_routes.ts
--- a/chrome/browser/resources/settings/settings_routes.ts
+++ b/chrome/browser/resources/settings/settings_routes.ts
@@ -98,4 +98,5 @@ export interface SettingsRoutes {
SITE_SETTINGS_AUTOPLAY: Route;
SITE_SETTINGS_JAVASCRIPT_JIT: Route;
SITE_SETTINGS_TIMEZONE_OVERRIDE: Route;
+ SITE_SETTINGS_WEBGL: Route;
}
diff --git a/chrome/browser/resources/settings/site_settings/category_default_setting.ts b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
--- a/chrome/browser/resources/settings/site_settings/category_default_setting.ts
+++ b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
@@ -198,6 +198,7 @@ export class CategoryDefaultSettingElement extends
case ContentSettingsTypes.AUTOPLAY:
case ContentSettingsTypes.JAVASCRIPT_JIT:
case ContentSettingsTypes.TIMEZONE_OVERRIDE:
+ case ContentSettingsTypes.WEBGL:
// "Allowed" vs "Blocked".
this.browserProxy.setDefaultValueForContentType(
this.category,
diff --git a/chrome/browser/resources/settings/site_settings/constants.ts b/chrome/browser/resources/settings/site_settings/constants.ts
--- a/chrome/browser/resources/settings/site_settings/constants.ts
+++ b/chrome/browser/resources/settings/site_settings/constants.ts
@@ -45,6 +45,7 @@ export enum ContentSettingsTypes {
AUTOPLAY = 'autoplay',
JAVASCRIPT_JIT = 'javascript-jit',
TIMEZONE_OVERRIDE = 'timezone-override',
+ WEBGL = 'webgl',
// The following item is not in the C++ kContentSettingsTypeGroupNames, but it
// is used everywhere where ContentSettingsTypes is used in JS.
diff --git a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
--- a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
+++ b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
@@ -142,6 +142,7 @@ export class SettingsCategoryDefaultRadioGroupElement extends
case ContentSettingsTypes.AUTOPLAY:
case ContentSettingsTypes.JAVASCRIPT_JIT:
case ContentSettingsTypes.TIMEZONE_OVERRIDE:
+ case ContentSettingsTypes.WEBGL:
// "Allowed" vs "Blocked".
return ContentSetting.ALLOW;
case ContentSettingsTypes.AR:
diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b/chrome/browser/resources/settings/site_settings/site_details.html
--- a/chrome/browser/resources/settings/site_settings/site_details.html
+++ b/chrome/browser/resources/settings/site_settings/site_details.html
@@ -238,4 +238,9 @@
icon="settings:timezone-override"
label="$i18n{siteSettingsTimezoneOverride}">
</site-details-permission>
+ <site-details-permission
+ category="[[contentSettingsTypesEnum_.WEBGL]]"
+ icon="settings:webgl"
+ label="$i18n{siteSettingsWebgl}">
+ </site-details-permission>
</div>
diff --git a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
--- a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
+++ b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
@@ -202,6 +202,8 @@ export class SettingsRecentSitePermissionsElement extends
return this.i18n('siteSettingsJavascriptJITMidSentence');
case ContentSettingsTypes.TIMEZONE_OVERRIDE:
return this.i18n('siteSettingsTimezoneOverrideMidSentence');
+ case ContentSettingsTypes.WEBGL:
+ return this.i18n('siteSettingsWebglMidSentence');
default:
return '';
}
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
--- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
+++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
@@ -337,6 +337,14 @@ function getCategoryItemMap(): Map<ContentSettingsTypes, CategoryListItem> {
enabledLabel: 'siteSettingsTimezoneOverrideAllowed',
disabledLabel: 'siteSettingsTimezoneOverrideBlocked',
},
+ {
+ route: routes.SITE_SETTINGS_WEBGL,
+ id: Id.WEBGL,
+ label: 'siteSettingsWebgl',
+ icon: 'settings:webgl',
+ enabledLabel: 'siteSettingsWebglAllowed',
+ disabledLabel: 'siteSettingsWebglBlocked',
+ },
];
categoryItemMap = new Map(categoryList.map(item => [item.id, item]));
@@ -422,6 +430,7 @@ export class SettingsSiteSettingsPageElement extends PolymerElement {
Id.AUTOPLAY,
Id.JAVASCRIPT_JIT,
Id.TIMEZONE_OVERRIDE,
+ Id.WEBGL,
]),
};
},
diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
--- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc
+++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
@@ -338,6 +338,9 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon(
case ContentSettingsType::TIMEZONE_OVERRIDE:
icon = &vector_icons::kAccountCircleIcon;
break;
+ case ContentSettingsType::WEBGL:
+ icon = &vector_icons::kProtectedContentIcon;
+ break;
default:
// All other |ContentSettingsType|s do not have icons on desktop or are
// not shown in the Page Info bubble.
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2104,6 +2104,13 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
{"siteSettingsTimezoneOverrideAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_ALLOWED_EXCEPTIONS},
{"siteSettingsTimezoneOverrideBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_BLOCKED_EXCEPTIONS},
{"siteSettingsTimezoneOverrideMidSentence", IDS_SITE_SETTINGS_TIMEZONE_OVERRIDE_TITLE},
+ {"siteSettingsWebgl", IDS_SITE_SETTINGS_WEBGL_TITLE},
+ {"siteSettingsWebglDescription", IDS_SETTINGS_SITE_SETTINGS_WEBGL_DESCRIPTION},
+ {"siteSettingsWebglAllowed", IDS_SETTINGS_SITE_SETTINGS_WEBGL_ALLOWED},
+ {"siteSettingsWebglBlocked", IDS_SETTINGS_SITE_SETTINGS_WEBGL_BLOCKED},
+ {"siteSettingsWebglAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_WEBGL_ALLOWED_EXCEPTIONS},
+ {"siteSettingsWebglBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_WEBGL_BLOCKED_EXCEPTIONS},
+ {"siteSettingsWebglMidSentence", IDS_SITE_SETTINGS_WEBGL_TITLE},
{"addSite", IDS_SETTINGS_ADD_SITE},
{"addSiteTitle", IDS_SETTINGS_ADD_SITE_TITLE},
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc
--- a/chrome/browser/ui/webui/settings/site_settings_helper.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc
@@ -118,6 +118,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{ContentSettingsType::AUTOPLAY, "autoplay"},
{ContentSettingsType::JAVASCRIPT_JIT, "javascript-jit"},
{ContentSettingsType::TIMEZONE_OVERRIDE, "timezone-override"},
+ {ContentSettingsType::WEBGL, "webgl"},
// Add new content settings here if a corresponding Javascript string
// representation for it is not required, for example if the content setting
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -694,7 +694,7 @@ void ContentSettingsRegistry::Init() {
ValidSettings(CONTENT_SETTING_ALLOW,
CONTENT_SETTING_BLOCK),
WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE,
- WebsiteSettingsRegistry::PLATFORM_ANDROID,
+ WebsiteSettingsRegistry::ALL_PLATFORMS,
ContentSettingsInfo::INHERIT_IN_INCOGNITO,
ContentSettingsInfo::PERSISTENT,
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS,
--
2.25.1
@@ -0,0 +1,252 @@
From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 08:52:11 +0000
Subject: Add webRTC site settings (win fixup)
---
chrome/app/settings_strings.grdp | 19 ++++++++++++++++
chrome/browser/resources/settings/icons.html | 2 ++
.../settings/privacy_page/privacy_page.html | 22 +++++++++++++++++++
chrome/browser/resources/settings/route.ts | 1 +
.../resources/settings/settings_routes.ts | 1 +
.../site_settings/category_default_setting.ts | 1 +
.../settings/site_settings/constants.ts | 1 +
.../settings_category_default_radio_group.ts | 1 +
.../settings/site_settings/site_details.html | 5 +++++
.../recent_site_permissions.ts | 2 ++
.../site_settings_page/site_settings_page.ts | 9 ++++++++
.../views/page_info/page_info_view_factory.cc | 3 +++
.../settings_localized_strings_provider.cc | 7 ++++++
.../ui/webui/settings/site_settings_helper.cc | 1 +
.../core/browser/content_settings_registry.cc | 2 +-
15 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -3734,6 +3734,25 @@
Not allowed to use webgl
</message>
+ <message name="IDS_SITE_SETTINGS_WEBRTC_TITLE" desc="Description of the WebRTC content setting page title.">
+ WebRTC
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_WEBRTC_DESCRIPTION" desc="Description of the WebRTC content setting.">
+ Enable WebRTC
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_WEBRTC_ALLOWED" desc="Label for the enabled option of the WebRTC setting.">
+ WebRTC is enabled
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_WEBRTC_BLOCKED" desc="Label for the disabled option of the WebRTC setting.">
+ WebRTC is disabled
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_WEBRTC_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the WebRTC setting.">
+ Allowed to use WebRTC
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_WEBRTC_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the WebRTC setting.">
+ Not allowed to use WebRTC
+ </message>
+
<if expr="not is_chromeos">
<!-- Import Settings Dialog -->
<message name="IDS_SETTINGS_IMPORT_SETTINGS_TITLE" desc="Dialog title for import dialog.">
diff --git a/chrome/browser/resources/settings/icons.html b/chrome/browser/resources/settings/icons.html
--- a/chrome/browser/resources/settings/icons.html
+++ b/chrome/browser/resources/settings/icons.html
@@ -176,6 +176,8 @@ NOTE: Chrome OS icons go in ./chromeos/os_icons.html.
<g id="timezone-override-off"><path d="M7.95,5.12l0.73-0.8C8.88,4.11,9.15,4,9.42,4c0.27,0,0.54,0.11,0.74,0.32L12,6.34l1.85-2.01C14.04,4.11,14.31,4,14.58,4 c0.27,0,0.54,0.11,0.74,0.32l6.42,7c0.35,0.38,0.35,0.97,0,1.35l-2.98,3.25l-1.42-1.42l2.3-2.51l-5.06-5.52l-1.23,1.34l3.21,3.51 c0.35,0.38,0.35,0.97,0,1.35l-0.51,0.56L7.95,5.12z M19.78,22.61l-3.73-3.73l-0.73,0.8c-0.2,0.22-0.47,0.32-0.74,0.32 c-0.27,0-0.54-0.11-0.74-0.32L12,17.66l-1.85,2.01C9.96,19.89,9.69,20,9.42,20c-0.27,0-0.54-0.11-0.74-0.32l-6.42-7 c-0.35-0.38-0.35-0.97,0-1.35l2.98-3.25L1.39,4.22l1.41-1.41l18.38,18.38L19.78,22.61z M10.64,16.18l-3.21-3.51 c-0.35-0.38-0.35-0.97,0-1.35l0.51-0.56L6.66,9.49L4.36,12l5.06,5.52L10.64,16.18z"></path></g>
<g id="webgl"><path d="M8 16h8v2H8v-2zm0-4h8v2H8v-2zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z" fill="#5F6368"></path></g>
<g id="webgl-off"><path d="M13.002 4.001H7.106L5.252 2.148c.232-.094.485-.147.75-.147h8l6 6v8.896l-2-2V9.001h-5v-5z" fill="#5F6368"></path><path d="M16.002 12.001h-.896l.896.896v-.896zM.6 3.45l1.414-1.414 19.94 19.94-1.414 1.414L.6 3.45zM3.986 20.01V6.84l2 2V20.01h11.172l1.765 1.766c-.28.15-.599.234-.937.234H5.976c-1.1 0-1.99-.9-1.99-2z" fill="#5F6368"></path><path d="M9.158 12.01H7.986v2h3.172l-2-2zM13.158 16.01H7.986v2h7.172l-2-2z" fill="#5F6368"></path></g>
+ <g id="webrtc"><path d="M8 16h8v2H8v-2zm0-4h8v2H8v-2zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z" fill="#5F6368"></path></g>
+ <g id="webrtc-off"><path d="M13.002 4.001H7.106L5.252 2.148c.232-.094.485-.147.75-.147h8l6 6v8.896l-2-2V9.001h-5v-5z" fill="#5F6368"></path><path d="M16.002 12.001h-.896l.896.896v-.896zM.6 3.45l1.414-1.414 19.94 19.94-1.414 1.414L.6 3.45zM3.986 20.01V6.84l2 2V20.01h11.172l1.765 1.766c-.28.15-.599.234-.937.234H5.976c-1.1 0-1.99-.9-1.99-2z" fill="#5F6368"></path><path d="M9.158 12.01H7.986v2h3.172l-2-2zM13.158 16.01H7.986v2h7.172l-2-2z" fill="#5F6368"></path></g>
</defs>
</svg>
</iron-iconset-svg>
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -1092,4 +1092,26 @@
</category-setting-exceptions>
</settings-subpage>
</template>
+ <template is="dom-if" route-path="/content/webrtc" no-search>
+ <settings-subpage page-title="$i18n{siteSettingsWebRTC}"
+ search-label="$i18n{siteSettingsAllSitesSearch}"
+ search-term="{{searchFilter_}}">
+ <div class="content-settings-header secondary">
+ $i18n{siteSettingsWebRTCDescription}
+ </div>
+ <settings-category-default-radio-group
+ category="[[contentSettingsTypesEnum_.WEBRTC]]"
+ allow-option-label="$i18n{siteSettingsWebRTCAllowed}"
+ allow-option-icon="settings:webrtc"
+ block-option-label="$i18n{siteSettingsWebRTCBlocked}"
+ block-option-icon="settings:webrtc-off">
+ </settings-category-default-radio-group>
+ <category-setting-exceptions
+ category="[[contentSettingsTypesEnum_.WEBRTC]]"
+ block-header="$i18n{siteSettingsWebRTCBlockedExceptions}"
+ allow-header="$i18n{siteSettingsWebRTCAllowedExceptions}"
+ search-filter="[[searchFilter_]]">
+ </category-setting-exceptions>
+ </settings-subpage>
+ </template>
</settings-animated-pages>
diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts
--- a/chrome/browser/resources/settings/route.ts
+++ b/chrome/browser/resources/settings/route.ts
@@ -106,6 +106,7 @@ function addPrivacyChildRoutes(r: Partial<SettingsRoutes>) {
r.SITE_SETTINGS_JAVASCRIPT_JIT = r.SITE_SETTINGS.createChild('javascript-jit');
r.SITE_SETTINGS_TIMEZONE_OVERRIDE = r.SITE_SETTINGS.createChild('timezone-override');
r.SITE_SETTINGS_WEBGL = r.SITE_SETTINGS.createChild('webgl');
+ r.SITE_SETTINGS_WEBRTC = r.SITE_SETTINGS.createChild('webrtc');
}
/**
diff --git a/chrome/browser/resources/settings/settings_routes.ts b/chrome/browser/resources/settings/settings_routes.ts
--- a/chrome/browser/resources/settings/settings_routes.ts
+++ b/chrome/browser/resources/settings/settings_routes.ts
@@ -99,4 +99,5 @@ export interface SettingsRoutes {
SITE_SETTINGS_JAVASCRIPT_JIT: Route;
SITE_SETTINGS_TIMEZONE_OVERRIDE: Route;
SITE_SETTINGS_WEBGL: Route;
+ SITE_SETTINGS_WEBRTC: Route;
}
diff --git a/chrome/browser/resources/settings/site_settings/category_default_setting.ts b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
--- a/chrome/browser/resources/settings/site_settings/category_default_setting.ts
+++ b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
@@ -199,6 +199,7 @@ export class CategoryDefaultSettingElement extends
case ContentSettingsTypes.JAVASCRIPT_JIT:
case ContentSettingsTypes.TIMEZONE_OVERRIDE:
case ContentSettingsTypes.WEBGL:
+ case ContentSettingsTypes.WEBRTC:
// "Allowed" vs "Blocked".
this.browserProxy.setDefaultValueForContentType(
this.category,
diff --git a/chrome/browser/resources/settings/site_settings/constants.ts b/chrome/browser/resources/settings/site_settings/constants.ts
--- a/chrome/browser/resources/settings/site_settings/constants.ts
+++ b/chrome/browser/resources/settings/site_settings/constants.ts
@@ -46,6 +46,7 @@ export enum ContentSettingsTypes {
JAVASCRIPT_JIT = 'javascript-jit',
TIMEZONE_OVERRIDE = 'timezone-override',
WEBGL = 'webgl',
+ WEBRTC = 'webrtc',
// The following item is not in the C++ kContentSettingsTypeGroupNames, but it
// is used everywhere where ContentSettingsTypes is used in JS.
diff --git a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
--- a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
+++ b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
@@ -143,6 +143,7 @@ export class SettingsCategoryDefaultRadioGroupElement extends
case ContentSettingsTypes.JAVASCRIPT_JIT:
case ContentSettingsTypes.TIMEZONE_OVERRIDE:
case ContentSettingsTypes.WEBGL:
+ case ContentSettingsTypes.WEBRTC:
// "Allowed" vs "Blocked".
return ContentSetting.ALLOW;
case ContentSettingsTypes.AR:
diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b/chrome/browser/resources/settings/site_settings/site_details.html
--- a/chrome/browser/resources/settings/site_settings/site_details.html
+++ b/chrome/browser/resources/settings/site_settings/site_details.html
@@ -243,4 +243,9 @@
icon="settings:webgl"
label="$i18n{siteSettingsWebgl}">
</site-details-permission>
+ <site-details-permission
+ category="[[contentSettingsTypesEnum_.WEBRTC]]"
+ icon="settings:webrtc"
+ label="$i18n{siteSettingsWebRTC}">
+ </site-details-permission>
</div>
diff --git a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
--- a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
+++ b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
@@ -204,6 +204,8 @@ export class SettingsRecentSitePermissionsElement extends
return this.i18n('siteSettingsTimezoneOverrideMidSentence');
case ContentSettingsTypes.WEBGL:
return this.i18n('siteSettingsWebglMidSentence');
+ case ContentSettingsTypes.WEBRTC:
+ return this.i18n('siteSettingsWebRTCMidSentence');
default:
return '';
}
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
--- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
+++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
@@ -345,6 +345,14 @@ function getCategoryItemMap(): Map<ContentSettingsTypes, CategoryListItem> {
enabledLabel: 'siteSettingsWebglAllowed',
disabledLabel: 'siteSettingsWebglBlocked',
},
+ {
+ route: routes.SITE_SETTINGS_WEBRTC,
+ id: Id.WEBRTC,
+ label: 'siteSettingsWebRTC',
+ icon: 'settings:webrtc',
+ enabledLabel: 'siteSettingsWebRTCAllowed',
+ disabledLabel: 'siteSettingsWebRTCBlocked',
+ },
];
categoryItemMap = new Map(categoryList.map(item => [item.id, item]));
@@ -431,6 +439,7 @@ export class SettingsSiteSettingsPageElement extends PolymerElement {
Id.JAVASCRIPT_JIT,
Id.TIMEZONE_OVERRIDE,
Id.WEBGL,
+ Id.WEBRTC,
]),
};
},
diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
--- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc
+++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
@@ -341,6 +341,9 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon(
case ContentSettingsType::WEBGL:
icon = &vector_icons::kProtectedContentIcon;
break;
+ case ContentSettingsType::WEBRTC:
+ icon = &vector_icons::kProtectedContentIcon;
+ break;
default:
// All other |ContentSettingsType|s do not have icons on desktop or are
// not shown in the Page Info bubble.
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2111,6 +2111,13 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
{"siteSettingsWebglAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_WEBGL_ALLOWED_EXCEPTIONS},
{"siteSettingsWebglBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_WEBGL_BLOCKED_EXCEPTIONS},
{"siteSettingsWebglMidSentence", IDS_SITE_SETTINGS_WEBGL_TITLE},
+ {"siteSettingsWebRTC", IDS_SITE_SETTINGS_WEBRTC_TITLE},
+ {"siteSettingsWebRTCDescription", IDS_SETTINGS_SITE_SETTINGS_WEBRTC_DESCRIPTION},
+ {"siteSettingsWebRTCAllowed", IDS_SETTINGS_SITE_SETTINGS_WEBRTC_ALLOWED},
+ {"siteSettingsWebRTCBlocked", IDS_SETTINGS_SITE_SETTINGS_WEBRTC_BLOCKED},
+ {"siteSettingsWebRTCAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_WEBRTC_ALLOWED_EXCEPTIONS},
+ {"siteSettingsWebRTCBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_WEBRTC_BLOCKED_EXCEPTIONS},
+ {"siteSettingsWebRTCMidSentence", IDS_SITE_SETTINGS_WEBRTC_TITLE},
{"addSite", IDS_SETTINGS_ADD_SITE},
{"addSiteTitle", IDS_SETTINGS_ADD_SITE_TITLE},
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc
--- a/chrome/browser/ui/webui/settings/site_settings_helper.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc
@@ -119,6 +119,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{ContentSettingsType::JAVASCRIPT_JIT, "javascript-jit"},
{ContentSettingsType::TIMEZONE_OVERRIDE, "timezone-override"},
{ContentSettingsType::WEBGL, "webgl"},
+ {ContentSettingsType::WEBRTC, "webrtc"},
// Add new content settings here if a corresponding Javascript string
// representation for it is not required, for example if the content setting
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -708,7 +708,7 @@ void ContentSettingsRegistry::Init() {
ValidSettings(CONTENT_SETTING_ALLOW,
CONTENT_SETTING_BLOCK),
WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE,
- WebsiteSettingsRegistry::PLATFORM_ANDROID,
+ WebsiteSettingsRegistry::ALL_PLATFORMS,
ContentSettingsInfo::INHERIT_IN_INCOGNITO,
ContentSettingsInfo::PERSISTENT,
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS,
--
2.25.1
@@ -0,0 +1,26 @@
From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 10:33:34 +0000
Subject: Client hints overrides (win fixup)
---
content/common/user_agent.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc
--- a/content/common/user_agent.cc
+++ b/content/common/user_agent.cc
@@ -323,7 +323,11 @@ std::string BuildUserAgentFromProduct(const std::string& product) {
}
std::string BuildModelInfo() {
- return "SAMSUNG SM-G960U";
+ std::string model;
+#if BUILDFLAG(IS_ANDROID)
+ model = "SAMSUNG SM-G960U"
+#endif
+ return model;
}
#if BUILDFLAG(IS_ANDROID)
--
2.25.1
@@ -0,0 +1,21 @@
From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 10:26:13 +0000
Subject: Content settings infrastructure (win fixup)
---
components/content_settings/core/common/content_settings.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
--- a/components/content_settings/core/common/content_settings.cc
+++ b/components/content_settings/core/common/content_settings.cc
@@ -129,6 +129,7 @@ ContentSetting IntToContentSetting(int content_setting) {
int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting,
size_t* num_values) {
*num_values = std::size(kHistogramValue);
+ if ((true)) return 0;
// Verify the array is sorted by enum type and contains all values.
DCHECK(std::is_sorted(std::begin(kHistogramValue), std::end(kHistogramValue),
--
2.25.1
@@ -0,0 +1,29 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 12:02:16 +0000
Subject: Disable requests for single-word Omni (win fixup)
---
chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
--- a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
@@ -76,6 +76,7 @@ bool OnlyChangeIsFromHTTPToHTTPS(const GURL& origin, const GURL& destination) {
return origin_with_https == destination;
}
+#if BUILDFLAG(IS_ANDROID)
// Choose the appropriate URLLoaderFactory: either an explicitly specified or a
// default for the given profile.
network::mojom::URLLoaderFactory* GetURLLoaderFactory(
@@ -87,6 +88,7 @@ network::mojom::URLLoaderFactory* GetURLLoaderFactory(
->GetURLLoaderFactoryForBrowserProcess()
.get();
}
+#endif
// Helper to keep ChromeOmniboxNavigationObserver alive while the initiated
// navigation is pending.
--
2.25.1
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,45 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:53:36 +0000
Subject: Disable various metrics (win fixup)
---
chrome/browser/ui/search/ntp_user_data_logger.cc | 4 ----
components/ntp_tiles/custom_links_manager_impl.cc | 1 -
2 files changed, 5 deletions(-)
diff --git a/chrome/browser/ui/search/ntp_user_data_logger.cc b/chrome/browser/ui/search/ntp_user_data_logger.cc
--- a/chrome/browser/ui/search/ntp_user_data_logger.cc
+++ b/chrome/browser/ui/search/ntp_user_data_logger.cc
@@ -429,8 +429,6 @@ void NTPUserDataLogger::LogMostVisitedImpression(
void NTPUserDataLogger::LogMostVisitedNavigation(
const ntp_tiles::NTPTileImpression& impression) {
- ntp_tiles::metrics::RecordTileClick(impression);
-
// Records the action. This will be available as a time-stamped stream
// server-side and can be used to compute time-to-long-dwell.
base::RecordAction(base::UserMetricsAction("MostVisited_Clicked"));
@@ -459,10 +457,8 @@ void NTPUserDataLogger::EmitNtpStatistics(base::TimeDelta load_time,
if (!impression.has_value()) {
break;
}
- ntp_tiles::metrics::RecordTileImpression(*impression);
++tiles_count;
}
- ntp_tiles::metrics::RecordPageImpression(tiles_count);
DVLOG(1) << "Emitting NTP load time: " << load_time << ", "
<< "number of tiles: " << tiles_count;
diff --git a/components/ntp_tiles/custom_links_manager_impl.cc b/components/ntp_tiles/custom_links_manager_impl.cc
--- a/components/ntp_tiles/custom_links_manager_impl.cc
+++ b/components/ntp_tiles/custom_links_manager_impl.cc
@@ -202,7 +202,6 @@ void CustomLinksManagerImpl::RemoveCustomLinksForPreinstalledApps() {
}
}
if (default_app_links_deleted) {
- metrics::RecordsMigratedDefaultAppDeleted(DeletedTileType::kCustomLink);
prefs_->SetBoolean(prefs::kCustomLinksForPreinstalledAppsRemoved, true);
}
}
--
2.25.1
@@ -0,0 +1,23 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:58:29 +0000
Subject: Do not build API keys infobar (win fixup)
---
chrome/browser/ui/startup/infobar_utils.cc | 3 ---
1 file changed, 3 deletions(-)
diff --git a/chrome/browser/ui/startup/infobar_utils.cc b/chrome/browser/ui/startup/infobar_utils.cc
--- a/chrome/browser/ui/startup/infobar_utils.cc
+++ b/chrome/browser/ui/startup/infobar_utils.cc
@@ -113,9 +113,6 @@ void AddInfoBarsIfNecessary(Browser* browser,
infobars::ContentInfoBarManager* infobar_manager =
infobars::ContentInfoBarManager::FromWebContents(web_contents);
- if (!google_apis::HasAPIKeyConfigured())
- GoogleApiKeysInfoBarDelegate::Create(infobar_manager);
-
if (ObsoleteSystem::IsObsoleteNowOrSoon()) {
PrefService* local_state = g_browser_process->local_state();
if (!local_state ||
--
2.25.1
@@ -0,0 +1,60 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:46:45 +0000
Subject: Enable native Android autofill (win fixup)
---
chrome/browser/extensions/extension_view_host.cc | 3 ++-
.../views/media_router/presentation_receiver_window_view.cc | 3 ++-
.../content/browser/content_autofill_driver_factory.cc | 6 ++++++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/chrome/browser/extensions/extension_view_host.cc b/chrome/browser/extensions/extension_view_host.cc
--- a/chrome/browser/extensions/extension_view_host.cc
+++ b/chrome/browser/extensions/extension_view_host.cc
@@ -58,7 +58,8 @@ ExtensionViewHost::ExtensionViewHost(const Extension* extension,
base::BindRepeating(
&autofill::BrowserDriverInitHook,
autofill::ChromeAutofillClient::FromWebContents(host_contents()),
- g_browser_process->GetApplicationLocale()));
+ g_browser_process->GetApplicationLocale(),
+ /*enable_secondary_autofill_manager*/ false));
// The popup itself cannot be zoomed, but we must specify a zoom level to use.
// Otherwise, if a user zooms a page of the same extension, the popup would
diff --git a/chrome/browser/ui/views/media_router/presentation_receiver_window_view.cc b/chrome/browser/ui/views/media_router/presentation_receiver_window_view.cc
--- a/chrome/browser/ui/views/media_router/presentation_receiver_window_view.cc
+++ b/chrome/browser/ui/views/media_router/presentation_receiver_window_view.cc
@@ -176,7 +176,8 @@ void PresentationReceiverWindowView::Init() {
base::BindRepeating(
&autofill::BrowserDriverInitHook,
autofill::ChromeAutofillClient::FromWebContents(web_contents),
- g_browser_process->GetApplicationLocale()));
+ g_browser_process->GetApplicationLocale(),
+ /*enable_secondary_autofill_manager*/ false));
ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
web_contents,
autofill::ChromeAutofillClient::FromWebContents(web_contents));
diff --git a/components/autofill/content/browser/content_autofill_driver_factory.cc b/components/autofill/content/browser/content_autofill_driver_factory.cc
--- a/components/autofill/content/browser/content_autofill_driver_factory.cc
+++ b/components/autofill/content/browser/content_autofill_driver_factory.cc
@@ -44,12 +44,18 @@ void BrowserDriverInitHook(AutofillClient* client,
const std::string& app_locale,
bool enable_secondary_autofill_manager,
ContentAutofillDriver* driver) {
+#if BUILDFLAG(IS_ANDROID)
driver->set_autofill_manager(std::make_unique<BrowserAutofillManager>(
driver, client, app_locale,
AutofillManager::EnableDownloadManager(false)),
enable_secondary_autofill_manager == false ? nullptr :
base::WrapUnique(new AndroidAutofillManager(driver, client,
AutofillManager::EnableDownloadManager(false))));
+#else
+ driver->set_autofill_manager(std::make_unique<BrowserAutofillManager>(
+ driver, client, app_locale,
+ AutofillManager::EnableDownloadManager(false)), nullptr);
+#endif
if (client && ShouldEnableHeavyFormDataScraping(client->GetChannel()))
driver->GetAutofillAgent()->EnableHeavyFormDataScraping();
}
--
2.25.1
@@ -0,0 +1,337 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 09:19:46 +0000
Subject: Experimental user scripts support (win fixup)
---
chrome/browser/BUILD.gn | 12 +++++++-----
chrome/browser/about_flags.cc | 2 ++
chrome/browser/prefs/browser_prefs.cc | 2 ++
chrome/browser/profiles/BUILD.gn | 4 +++-
...chrome_browser_main_extra_parts_profiles.cc | 4 ++++
chrome/browser/profiles/profile_manager.cc | 4 ++++
chrome/browser/profiles/renderer_updater.cc | 11 ++++++++++-
chrome/browser/profiles/renderer_updater.h | 2 ++
.../webui/chrome_web_ui_controller_factory.cc | 2 ++
chrome/renderer/BUILD.gn | 7 ++++++-
.../renderer/chrome_content_renderer_client.cc | 18 ++++++++++++++++++
.../renderer/chrome_render_thread_observer.cc | 2 ++
12 files changed, 62 insertions(+), 8 deletions(-)
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3492,11 +3492,13 @@ static_library("browser") {
]
deps += [ "//chrome/android/modules/dev_ui/provider:native" ]
}
- deps += [
- "//components/user_scripts/common",
- "//components/user_scripts/browser",
- "//components/user_scripts/android",
- ]
+ if (is_android) {
+ deps += [
+ "//components/user_scripts/common",
+ "//components/user_scripts/browser",
+ "//components/user_scripts/android",
+ ]
+ }
} else {
#!is_android
sources += [
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -7398,9 +7398,11 @@ const FeatureEntry kFeatureEntries[] = {
chromeos::features::kClipboardHistoryNudgeSessionReset)},
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_ANDROID)
{"enable-userscripts-log", flag_descriptions::kEnableLoggingUserScriptsName,
flag_descriptions::kEnableLoggingUserScriptsDescription, kOsDesktop | kOsAndroid,
FEATURE_VALUE_TYPE(user_scripts::features::kEnableLoggingUserScripts)},
+#endif
#if BUILDFLAG(IS_WIN)
{"enable-media-foundation-video-capture",
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1324,7 +1324,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
translate::TranslatePrefs::RegisterProfilePrefs(registry);
omnibox::RegisterProfilePrefs(registry);
ZeroSuggestProvider::RegisterProfilePrefs(registry);
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsPrefs::RegisterProfilePrefs(registry);
+#endif
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
RegisterSessionServiceLogProfilePrefs(registry);
diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn
--- a/chrome/browser/profiles/BUILD.gn
+++ b/chrome/browser/profiles/BUILD.gn
@@ -44,10 +44,12 @@ source_set("profile") {
"//components/profile_metrics",
"//components/sync/driver",
"//components/variations",
- "//components/user_scripts/browser",
"//content/public/browser",
"//extensions/buildflags",
]
+ if (is_android) {
+ deps += [ "//components/user_scripts/browser" ]
+ }
if (enable_extensions) {
deps += [ "//extensions/browser" ]
}
diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
@@ -270,7 +270,9 @@
#include "chrome/browser/enterprise/idle/idle_service_factory.h"
#endif
+#if BUILDFLAG(IS_ANDROID)
#include "components/user_scripts/browser/userscripts_browser_client.h"
+#endif
namespace chrome {
@@ -631,7 +633,9 @@ void ChromeBrowserMainExtraPartsProfiles::
#endif
WebDataServiceFactory::GetInstance();
webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance();
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsBrowserClient::GetInstance();
+#endif
}
void ChromeBrowserMainExtraPartsProfiles::PreProfileInit() {
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -115,7 +115,9 @@
#include "extensions/common/manifest.h"
#endif
+#if BUILDFLAG(IS_ANDROID)
#include "components/user_scripts/browser/userscripts_browser_client.h"
+#endif
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
#include "chrome/browser/sessions/app_session_service_factory.h"
@@ -1715,11 +1717,13 @@ void ProfileManager::DoFinalInitForServices(Profile* profile,
#endif
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsBrowserClient* userscript_client =
user_scripts::UserScriptsBrowserClient::GetInstance();
if (userscript_client) {
userscript_client->SetProfile(profile);
}
+#endif
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
// Initialization needs to happen after extension system initialization (for
diff --git a/chrome/browser/profiles/renderer_updater.cc b/chrome/browser/profiles/renderer_updater.cc
--- a/chrome/browser/profiles/renderer_updater.cc
+++ b/chrome/browser/profiles/renderer_updater.cc
@@ -53,7 +53,9 @@ RendererUpdater::RendererUpdater(Profile* profile)
force_google_safesearch_.Init(prefs::kForceGoogleSafeSearch, pref_service);
force_youtube_restrict_.Init(prefs::kForceYouTubeRestrict, pref_service);
allowed_domains_for_apps_.Init(prefs::kAllowedDomainsForApps, pref_service);
+#if BUILDFLAG(IS_ANDROID)
activate_userscripts_.Init(user_scripts::prefs::kUserScriptsEnabled, pref_service);
+#endif
pref_change_registrar_.Init(pref_service);
pref_change_registrar_.Add(
@@ -68,10 +70,12 @@ RendererUpdater::RendererUpdater(Profile* profile)
prefs::kAllowedDomainsForApps,
base::BindRepeating(&RendererUpdater::UpdateAllRenderers,
base::Unretained(this)));
+#if BUILDFLAG(IS_ANDROID)
pref_change_registrar_.Add(
user_scripts::prefs::kUserScriptsEnabled,
base::BindRepeating(&RendererUpdater::UpdateAllRenderers,
base::Unretained(this)));
+#endif
}
RendererUpdater::~RendererUpdater() {
@@ -196,5 +200,10 @@ chrome::mojom::DynamicParamsPtr RendererUpdater::CreateRendererDynamicParams()
return chrome::mojom::DynamicParams::New(
force_google_safesearch_.GetValue(), force_youtube_restrict_.GetValue(),
allowed_domains_for_apps_.GetValue(),
- activate_userscripts_.GetValue());
+#if BUILDFLAG(IS_ANDROID)
+ activate_userscripts_.GetValue()
+#else
+ false
+#endif
+ );
}
diff --git a/chrome/browser/profiles/renderer_updater.h b/chrome/browser/profiles/renderer_updater.h
--- a/chrome/browser/profiles/renderer_updater.h
+++ b/chrome/browser/profiles/renderer_updater.h
@@ -93,7 +93,9 @@ class RendererUpdater : public KeyedService,
// Prefs that we sync to the renderers.
BooleanPrefMember force_google_safesearch_;
+#if BUILDFLAG(IS_ANDROID)
BooleanPrefMember activate_userscripts_;
+#endif
IntegerPrefMember force_youtube_restrict_;
StringPrefMember allowed_domains_for_apps_;
};
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -818,8 +818,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
return &NewWebUI<UserActionsUI>;
if (url.host_piece() == chrome::kChromeUIVersionHost)
return &NewWebUI<VersionUI>;
+#if BUILDFLAG(IS_ANDROID)
if (url.host_piece() == user_scripts::kChromeUIUserScriptsHost)
return &NewWebUI<user_scripts::UserScriptsUI>;
+#endif
#if !BUILDFLAG(IS_ANDROID)
#if !BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn
--- a/chrome/renderer/BUILD.gn
+++ b/chrome/renderer/BUILD.gn
@@ -141,7 +141,6 @@ static_library("renderer") {
"//components/content_capture/common",
"//components/content_capture/renderer",
"//components/content_settings/common:mojom",
- "//components/user_scripts/renderer",
"//components/content_settings/renderer",
"//components/continuous_search/renderer",
"//components/dom_distiller/content/renderer",
@@ -215,6 +214,12 @@ static_library("renderer") {
"//v8",
]
+ if (is_android) {
+ deps += [
+ "//components/user_scripts/renderer",
+ ]
+ }
+
data_deps = [ "//tools/v8_context_snapshot" ]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -250,8 +250,10 @@
#include "chrome/renderer/supervised_user/supervised_user_error_page_controller_delegate_impl.h"
#endif
+#if BUILDFLAG(IS_ANDROID)
#include "components/user_scripts/common/user_scripts_features.h"
#include "components/user_scripts/renderer/user_scripts_renderer_client.h"
+#endif
using autofill::AutofillAgent;
using autofill::PasswordAutofillAgent;
@@ -434,11 +436,13 @@ void ChromeContentRendererClient::RenderThreadStarted() {
WebString::FromASCII(extensions::kExtensionScheme));
#endif
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsRendererClient* userscript_client =
user_scripts::UserScriptsRendererClient::GetInstance();
if (userscript_client) {
userscript_client->RenderThreadStarted();
}
+#endif
#if BUILDFLAG(ENABLE_SPELLCHECK)
if (!spellcheck_)
@@ -584,12 +588,14 @@ void ChromeContentRendererClient::RenderFrameCreated(
render_frame, registry);
#endif
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsRendererClient* userscript_client =
user_scripts::UserScriptsRendererClient::GetInstance();
if (userscript_client) {
userscript_client->RenderFrameCreated(
render_frame, registry);
}
+#endif
#if BUILDFLAG(ENABLE_PPAPI)
new PepperHelper(render_frame);
@@ -1592,6 +1598,9 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart(
ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentStart(
render_frame);
// |render_frame| might be dead by now.
+#endif
+#if BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
static_assert(false, "Compiler error: extensions cannot be enabled with user scripts");
#endif
user_scripts::UserScriptsRendererClient* userscript_client =
@@ -1600,6 +1609,7 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart(
userscript_client->RunScriptsAtDocumentStart(
render_frame);
}
+#endif
}
void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
@@ -1608,6 +1618,9 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd(
render_frame);
// |render_frame| might be dead by now.
+#endif
+#if BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
static_assert(false, "Compiler error: extensions cannot be enabled with user scripts");
#endif
user_scripts::UserScriptsRendererClient* userscript_client =
@@ -1616,6 +1629,7 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
userscript_client->RunScriptsAtDocumentEnd(
render_frame);
}
+#endif
}
void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
@@ -1624,6 +1638,9 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentIdle(
render_frame);
// |render_frame| might be dead by now.
+#endif
+#if BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
static_assert(false, "Compiler error: extensions cannot be enabled with user scripts");
#endif
user_scripts::UserScriptsRendererClient* userscript_client =
@@ -1632,6 +1649,7 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
userscript_client->RunScriptsAtDocumentIdle(
render_frame);
}
+#endif
}
void ChromeContentRendererClient::
diff --git a/chrome/renderer/chrome_render_thread_observer.cc b/chrome/renderer/chrome_render_thread_observer.cc
--- a/chrome/renderer/chrome_render_thread_observer.cc
+++ b/chrome/renderer/chrome_render_thread_observer.cc
@@ -255,7 +255,9 @@ void ChromeRenderThreadObserver::SetInitialConfiguration(
void ChromeRenderThreadObserver::SetConfiguration(
chrome::mojom::DynamicParamsPtr params) {
*GetDynamicConfigParams() = std::move(*params);
+#if BUILDFLAG(IS_ANDROID)
user_scripts::UserScriptsRendererClient::GetInstance()->ConfigurationUpdated();
+#endif
}
void ChromeRenderThreadObserver::OnRendererConfigurationAssociatedRequest(
--
2.25.1
@@ -0,0 +1,22 @@
From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 10:24:51 +0000
Subject: Eyeo Adblock (win fixup)
---
chrome/browser/resources/settings/adblock_page/adblock_page.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/resources/settings/adblock_page/adblock_page.ts b/chrome/browser/resources/settings/adblock_page/adblock_page.ts
--- a/chrome/browser/resources/settings/adblock_page/adblock_page.ts
+++ b/chrome/browser/resources/settings/adblock_page/adblock_page.ts
@@ -15,7 +15,7 @@
* along with eyeo Chromium SDK. If not, see <http://www.gnu.org/licenses/>.
*/
import 'chrome://resources/cr_elements/cr_button/cr_button.js';
-import 'chrome://resources/cr_elements/cr_shared_style.css.js';
+//import 'chrome://resources/cr_elements/cr_shared_style.css.js';
import 'chrome://resources/polymer/v3_0/iron-collapse/iron-collapse.js';
import 'chrome://resources/polymer/v3_0/iron-flex-layout/iron-flex-layout-classes.js';
import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js';
--
2.25.1
+21
View File
@@ -0,0 +1,21 @@
From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 10:34:52 +0000
Subject: Fix windows build
---
chrome/browser/devtools/devtools_window.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -80,6 +80,7 @@
#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/events/keycodes/keyboard_code_conversion.h"
#include "ui/events/keycodes/keyboard_codes.h"
+#include "net/cert/x509_certificate.h"
// This should be after all other #includes.
#if defined(_WINDOWS_) // Detect whether windows.h was included.
--
2.25.1
@@ -0,0 +1,273 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 14:03:37 +0000
Subject: JIT site settings (win fixup)
---
chrome/app/settings_strings.grdp | 19 ++++++++++++++++
chrome/browser/resources/settings/icons.html | 2 ++
.../settings/privacy_page/privacy_page.html | 22 +++++++++++++++++++
chrome/browser/resources/settings/route.ts | 1 +
.../resources/settings/settings_routes.ts | 1 +
.../site_settings/category_default_setting.ts | 1 +
.../settings/site_settings/constants.ts | 1 +
.../settings_category_default_radio_group.ts | 1 +
.../settings/site_settings/site_details.html | 5 +++++
.../recent_site_permissions.ts | 2 ++
.../site_settings_page/site_settings_page.ts | 9 ++++++++
.../views/page_info/page_info_view_factory.cc | 3 +++
.../settings_localized_strings_provider.cc | 7 ++++++
.../ui/webui/settings/site_settings_helper.cc | 3 ++-
.../core/browser/content_settings_registry.cc | 7 +++++-
15 files changed, 82 insertions(+), 2 deletions(-)
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -3677,6 +3677,25 @@
Not allowed to autoplay
</message>
+ <message name="IDS_SITE_SETTINGS_JAVASCRIPT_JIT_TITLE" desc="Description of the Javascript JIT content setting page title.">
+ Javascript JIT
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_DESCRIPTION" desc="Description of the Javascript JIT content setting.">
+ Enable the JIT compiler in V8
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_ALLOWED" desc="Label for the enabled option of the Javascript JIT setting.">
+ Javascript JIT is enabled
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_BLOCKED" desc="Label for the disabled option of the Javascript JIT setting.">
+ Javascript JIT is disabled
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the Javascript JIT setting.">
+ Allowed to Javascript JIT
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the Javascript JIT setting.">
+ Not allowed to Javascript JIT
+ </message>
+
<if expr="not is_chromeos">
<!-- Import Settings Dialog -->
<message name="IDS_SETTINGS_IMPORT_SETTINGS_TITLE" desc="Dialog title for import dialog.">
diff --git a/chrome/browser/resources/settings/icons.html b/chrome/browser/resources/settings/icons.html
--- a/chrome/browser/resources/settings/icons.html
+++ b/chrome/browser/resources/settings/icons.html
@@ -170,6 +170,8 @@ NOTE: Chrome OS icons go in ./chromeos/os_icons.html.
<g id="file-handling-off"><path d="M13.002 4.001H7.106L5.252 2.148c.232-.094.485-.147.75-.147h8l6 6v8.896l-2-2V9.001h-5v-5z" fill="#5F6368"></path><path d="M16.002 12.001h-.896l.896.896v-.896zM.6 3.45l1.414-1.414 19.94 19.94-1.414 1.414L.6 3.45zM3.986 20.01V6.84l2 2V20.01h11.172l1.765 1.766c-.28.15-.599.234-.937.234H5.976c-1.1 0-1.99-.9-1.99-2z" fill="#5F6368"></path><path d="M9.158 12.01H7.986v2h3.172l-2-2zM13.158 16.01H7.986v2h7.172l-2-2z" fill="#5F6368"></path></g>
<g id="autoplay"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"></path></g>
<g id="autoplay-off"><path d="M16.25,13.42C16.4,12.97,16.5,12.5,16.5,12c0-1.77-1.02-3.29-2.5-4.03v3.2L16.25,13.42z"></path><path d="M19,12c0,1.21-0.31,2.34-0.85,3.32l1.46,1.46C20.48,15.39,21,13.76,21,12c0-4.28-2.99-7.86-7-8.77v2.06 C16.89,6.15,19,8.83,19,12z"></path><path d="M2.81,2.81L1.39,4.22L6.17,9H3v6h4l5,5v-5.17l3.32,3.32c-0.42,0.23-0.85,0.43-1.32,0.56v2.06c1-0.23,1.94-0.62,2.79-1.15 l2.99,2.99l1.41-1.41L2.81,2.81z"></path><polygon points="12,9.17 12,4 9.41,6.59"></polygon></g>
+ <g id="javascript-jit"><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"></path></g>
+ <g id="javascript-jit-off"><path d="M19.17,12l-4.58-4.59L16,6l6,6l-3.59,3.59L17,14.17L19.17,12z M1.39,4.22l4.19,4.19L2,12l6,6l1.41-1.41L4.83,12L7,9.83 l12.78,12.78l1.41-1.41L2.81,2.81L1.39,4.22z"></path></g>
</defs>
</svg>
</iron-iconset-svg>
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -1026,4 +1026,26 @@
</category-setting-exceptions>
</settings-subpage>
</template>
+ <template is="dom-if" route-path="/content/javascript-jit" no-search>
+ <settings-subpage page-title="$i18n{siteSettingsJavascriptJIT}"
+ search-label="$i18n{siteSettingsAllSitesSearch}"
+ search-term="{{searchFilter_}}">
+ <div class="content-settings-header secondary">
+ $i18n{siteSettingsJavascriptJITDescription}
+ </div>
+ <settings-category-default-radio-group
+ category="[[contentSettingsTypesEnum_.JAVASCRIPT_JIT]]"
+ allow-option-label="$i18n{siteSettingsJavascriptJITAllowed}"
+ allow-option-icon="settings:javascript-jit"
+ block-option-label="$i18n{siteSettingsJavascriptJITBlocked}"
+ block-option-icon="settings:javascript-jit-off">
+ </settings-category-default-radio-group>
+ <category-setting-exceptions
+ category="[[contentSettingsTypesEnum_.JAVASCRIPT_JIT]]"
+ block-header="$i18n{siteSettingsJavascriptJITBlockedExceptions}"
+ allow-header="$i18n{siteSettingsJavascriptJITAllowedExceptions}"
+ search-filter="[[searchFilter_]]">
+ </category-setting-exceptions>
+ </settings-subpage>
+ </template>
</settings-animated-pages>
diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts
--- a/chrome/browser/resources/settings/route.ts
+++ b/chrome/browser/resources/settings/route.ts
@@ -103,6 +103,7 @@ function addPrivacyChildRoutes(r: Partial<SettingsRoutes>) {
r.SITE_SETTINGS_FILE_SYSTEM_WRITE = r.SITE_SETTINGS.createChild('filesystem');
r.SITE_SETTINGS_LOCAL_FONTS = r.SITE_SETTINGS.createChild('localFonts');
r.SITE_SETTINGS_AUTOPLAY = r.SITE_SETTINGS.createChild('autoplay');
+ r.SITE_SETTINGS_JAVASCRIPT_JIT = r.SITE_SETTINGS.createChild('javascript-jit');
}
/**
diff --git a/chrome/browser/resources/settings/settings_routes.ts b/chrome/browser/resources/settings/settings_routes.ts
--- a/chrome/browser/resources/settings/settings_routes.ts
+++ b/chrome/browser/resources/settings/settings_routes.ts
@@ -96,4 +96,5 @@ export interface SettingsRoutes {
SYSTEM: Route;
TRIGGERED_RESET_DIALOG: Route;
SITE_SETTINGS_AUTOPLAY: Route;
+ SITE_SETTINGS_JAVASCRIPT_JIT: Route;
}
diff --git a/chrome/browser/resources/settings/site_settings/category_default_setting.ts b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
--- a/chrome/browser/resources/settings/site_settings/category_default_setting.ts
+++ b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
@@ -196,6 +196,7 @@ export class CategoryDefaultSettingElement extends
case ContentSettingsTypes.SENSORS:
case ContentSettingsTypes.SOUND:
case ContentSettingsTypes.AUTOPLAY:
+ case ContentSettingsTypes.JAVASCRIPT_JIT:
// "Allowed" vs "Blocked".
this.browserProxy.setDefaultValueForContentType(
this.category,
diff --git a/chrome/browser/resources/settings/site_settings/constants.ts b/chrome/browser/resources/settings/site_settings/constants.ts
--- a/chrome/browser/resources/settings/site_settings/constants.ts
+++ b/chrome/browser/resources/settings/site_settings/constants.ts
@@ -43,6 +43,7 @@ export enum ContentSettingsTypes {
WINDOW_PLACEMENT = 'window-placement',
ZOOM_LEVELS = 'zoom-levels',
AUTOPLAY = 'autoplay',
+ JAVASCRIPT_JIT = 'javascript-jit',
// The following item is not in the C++ kContentSettingsTypeGroupNames, but it
// is used everywhere where ContentSettingsTypes is used in JS.
diff --git a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
--- a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
+++ b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
@@ -140,6 +140,7 @@ export class SettingsCategoryDefaultRadioGroupElement extends
case ContentSettingsTypes.SENSORS:
case ContentSettingsTypes.SOUND:
case ContentSettingsTypes.AUTOPLAY:
+ case ContentSettingsTypes.JAVASCRIPT_JIT:
// "Allowed" vs "Blocked".
return ContentSetting.ALLOW;
case ContentSettingsTypes.AR:
diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b/chrome/browser/resources/settings/site_settings/site_details.html
--- a/chrome/browser/resources/settings/site_settings/site_details.html
+++ b/chrome/browser/resources/settings/site_settings/site_details.html
@@ -228,4 +228,9 @@
icon="settings:federated-identity-api"
label="$i18n{siteSettingsFederatedIdentityApi}">
</site-details-permission>
+ <site-details-permission
+ category="[[contentSettingsTypesEnum_.JAVASCRIPT_JIT]]"
+ icon="settings:javascript-jit"
+ label="$i18n{siteSettingsJavascriptJIT}">
+ </site-details-permission>
</div>
diff --git a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
--- a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
+++ b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
@@ -198,6 +198,8 @@ export class SettingsRecentSitePermissionsElement extends
return this.i18n('siteSettingsIdleDetectionMidSentence');
case ContentSettingsTypes.AUTOPLAY:
return this.i18n('siteSettingsAutoplayMidSentence');
+ case ContentSettingsTypes.JAVASCRIPT_JIT:
+ return this.i18n('siteSettingsJavascriptJITMidSentence');
default:
return '';
}
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
--- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
+++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
@@ -321,6 +321,14 @@ function getCategoryItemMap(): Map<ContentSettingsTypes, CategoryListItem> {
enabledLabel: 'siteSettingsAutoplayAllowed',
disabledLabel: 'siteSettingsAutoplayBlocked',
},
+ {
+ route: routes.SITE_SETTINGS_JAVASCRIPT_JIT,
+ id: Id.JAVASCRIPT_JIT,
+ label: 'siteSettingsJavascriptJIT',
+ icon: 'settings:javascript-jit',
+ enabledLabel: 'siteSettingsJavascriptJITAllowed',
+ disabledLabel: 'siteSettingsJavascriptJITBlocked',
+ },
];
categoryItemMap = new Map(categoryList.map(item => [item.id, item]));
@@ -404,6 +412,7 @@ export class SettingsSiteSettingsPageElement extends PolymerElement {
Id.MIXEDSCRIPT,
Id.FEDERATED_IDENTITY_API,
Id.AUTOPLAY,
+ Id.JAVASCRIPT_JIT,
]),
};
},
diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
--- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc
+++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
@@ -332,6 +332,9 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon(
case ContentSettingsType::AUTOPLAY:
icon = &vector_icons::kProtectedContentIcon;
break;
+ case ContentSettingsType::JAVASCRIPT_JIT:
+ icon = &vector_icons::kCodeIcon;
+ break;
default:
// All other |ContentSettingsType|s do not have icons on desktop or are
// not shown in the Page Info bubble.
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2090,6 +2090,13 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
{"siteSettingsAutoplayAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_ALLOWED_EXCEPTIONS},
{"siteSettingsAutoplayBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_BLOCKED_EXCEPTIONS},
{"siteSettingsAutoplayMidSentence", IDS_SITE_SETTINGS_TYPE_AUTOPLAY},
+ {"siteSettingsJavascriptJIT", IDS_SITE_SETTINGS_JAVASCRIPT_JIT_TITLE},
+ {"siteSettingsJavascriptJITDescription", IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_DESCRIPTION},
+ {"siteSettingsJavascriptJITAllowed", IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_ALLOWED},
+ {"siteSettingsJavascriptJITBlocked", IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_BLOCKED},
+ {"siteSettingsJavascriptJITAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_ALLOWED_EXCEPTIONS},
+ {"siteSettingsJavascriptJITBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_BLOCKED_EXCEPTIONS},
+ {"siteSettingsJavascriptJITMidSentence", IDS_SITE_SETTINGS_TYPE_JAVASCRIPT_JIT},
{"addSite", IDS_SETTINGS_ADD_SITE},
{"addSiteTitle", IDS_SETTINGS_ADD_SITE_TITLE},
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc
--- a/chrome/browser/ui/webui/settings/site_settings_helper.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc
@@ -116,6 +116,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
"file-system-access-handles-data"},
{ContentSettingsType::FEDERATED_IDENTITY_API, "federated-identity-api"},
{ContentSettingsType::AUTOPLAY, "autoplay"},
+ {ContentSettingsType::JAVASCRIPT_JIT, "javascript-jit"},
// Add new content settings here if a corresponding Javascript string
// representation for it is not required, for example if the content setting
@@ -153,7 +154,6 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{ContentSettingsType::FILE_SYSTEM_LAST_PICKED_DIRECTORY, nullptr},
{ContentSettingsType::DISPLAY_CAPTURE, nullptr},
{ContentSettingsType::FEDERATED_IDENTITY_SHARING, nullptr},
- {ContentSettingsType::JAVASCRIPT_JIT, nullptr},
{ContentSettingsType::HTTP_ALLOWED, nullptr},
{ContentSettingsType::FORMFILL_METADATA, nullptr},
{ContentSettingsType::FEDERATED_IDENTITY_ACTIVE_SESSION, nullptr},
@@ -447,6 +447,7 @@ const std::vector<ContentSettingsType>& GetVisiblePermissionCategories() {
}
base_types->push_back(ContentSettingsType::AUTOPLAY);
+ base_types->push_back(ContentSettingsType::JAVASCRIPT_JIT);
initialized = true;
}
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -621,7 +621,12 @@ void ContentSettingsRegistry::Init() {
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY);
Register(ContentSettingsType::JAVASCRIPT_JIT, "javascript-jit",
- CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::UNSYNCABLE,
+#if BUILDFLAG(IS_ANDROID)
+ CONTENT_SETTING_BLOCK,
+#else
+ CONTENT_SETTING_ALLOW,
+#endif
+ WebsiteSettingsInfo::UNSYNCABLE,
AllowlistedSchemes(),
ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK),
WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE,
--
2.25.1
@@ -0,0 +1,81 @@
From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 11:27:08 +0000
Subject: Logcat crash reports UI (win fixup)
---
chrome/browser/ui/webui/crashes_ui.cc | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/chrome/browser/ui/webui/crashes_ui.cc b/chrome/browser/ui/webui/crashes_ui.cc
--- a/chrome/browser/ui/webui/crashes_ui.cc
+++ b/chrome/browser/ui/webui/crashes_ui.cc
@@ -44,7 +44,9 @@
#include "base/files/scoped_temp_dir.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
+#if BUILDFLAG(IS_ANDROID)
#include "base/android/path_utils.h"
+#endif
#include "net/base/filename_util.h"
#include "third_party/zlib/google/zip.h"
@@ -147,6 +149,9 @@ CrashesDOMHandler::CrashesDOMHandler(content::WebContents* web_contents)
: list_available_(false), first_load_(true),
web_contents_(web_contents) {
upload_list_ = CreateCrashUploadList();
+#if !BUILDFLAG(IS_ANDROID)
+ web_contents_ = nullptr;
+#endif
}
CrashesDOMHandler::~CrashesDOMHandler() {
@@ -285,6 +290,7 @@ void CrashesDOMHandler::HandleRequestSingleCrashUpload(
}
std::string CrashesDOMHandler::RequestSingleUpload(const std::string& local_id) const {
+#if BUILDFLAG(IS_ANDROID)
// get crash file path
std::string info_file_path = upload_list_->GetFilePathByLocalId(local_id);
if (info_file_path.empty()) {
@@ -332,13 +338,14 @@ std::string CrashesDOMHandler::RequestSingleUpload(const std::string& local_id)
if (result) {
return zip_file_name.value();
}
-
+#endif
LOG(ERROR) << "Crash report: cannot create zip content";
return std::string();
}
void CrashesDOMHandler::RequestSingleUploadCallback(const std::string& local_id,
const std::string& file_name) {
+#if BUILDFLAG(IS_ANDROID)
if (!file_name.empty()) {
upload_list_->RequestSingleUploadAsync(local_id);
@@ -346,6 +353,7 @@ void CrashesDOMHandler::RequestSingleUploadCallback(const std::string& local_id,
web_contents_->GetController().LoadURL(
net::FilePathToFileURL(file_path), {}, {}, {});
}
+#endif
}
void CrashesDOMHandler::HandleRequestNewExtraction(
@@ -370,6 +378,7 @@ void CrashesDOMHandler::HandleRequestClearAll(
}
void CrashesDOMHandler::ClearAll() {
+#if BUILDFLAG(IS_ANDROID)
// get android crash report dir
base::FilePath cache_dir;
base::android::GetCacheDirectory(&cache_dir);
@@ -383,6 +392,7 @@ void CrashesDOMHandler::ClearAll() {
// remove all files, don't care for result
base::DeleteFile(full_name);
}
+#endif
}
} // namespace
--
2.25.1
@@ -0,0 +1,22 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:35:41 +0000
Subject: Remove EV certificates (win fixup)
---
net/cert/ev_root_ca_metadata.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/cert/ev_root_ca_metadata.cc b/net/cert/ev_root_ca_metadata.cc
--- a/net/cert/ev_root_ca_metadata.cc
+++ b/net/cert/ev_root_ca_metadata.cc
@@ -67,7 +67,7 @@ EVRootCAMetadata* EVRootCAMetadata::GetInstance() {
return g_ev_root_ca_metadata.Pointer();
}
-#if BUILDFLAG(IS_WIN)
+#if BUILDFLAG(IS_WIN) && defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
namespace {
--
2.25.1
@@ -0,0 +1,49 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:41:35 +0000
Subject: Remove binary blob integrations (win fixup)
---
components/gcm_driver/gcm_client_impl.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc
--- a/components/gcm_driver/gcm_client_impl.cc
+++ b/components/gcm_driver/gcm_client_impl.cc
@@ -465,7 +465,7 @@ void GCMClientImpl::StartGCM() {
void GCMClientImpl::InitializeMCSClient() {
DCHECK(network_connection_tracker_);
- return;
+ if ((true)) return;
std::vector<GURL> endpoints;
endpoints.push_back(gservices_settings_.GetMCSMainEndpoint());
GURL fallback_endpoint = gservices_settings_.GetMCSFallbackEndpoint();
@@ -660,7 +660,7 @@ void GCMClientImpl::AddHeartbeatInterval(const std::string& scope,
int interval_ms) {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
DCHECK(mcs_client_);
- return;
+ if ((true)) return;
mcs_client_->AddHeartbeatInterval(scope, interval_ms);
}
@@ -672,7 +672,7 @@ void GCMClientImpl::RemoveHeartbeatInterval(const std::string& scope) {
void GCMClientImpl::StartCheckin() {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
- return;
+ if ((true)) return;
// Make sure no checkin is in progress.
if (checkin_request_)
@@ -755,7 +755,7 @@ void GCMClientImpl::SetGServicesSettingsCallback(bool success) {
void GCMClientImpl::SchedulePeriodicCheckin() {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
- return;
+ if ((true)) return;
// Make sure no checkin is in progress.
if (checkin_request_.get() || !device_checkin_info_.accounts_set)
--
2.25.1
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 12:01:37 +0000
Subject: Restore Search Ready Omnibox flag (win fixup)
---
chrome/browser/about_flags.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -8780,9 +8780,11 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kPervasiveSystemAccentColorDescription, kOsWin,
SINGLE_VALUE_TYPE(switches::kPervasiveSystemAccentColor)},
#endif
+#if BUILDFLAG(IS_ANDROID)
{"enable-search-ready-omnibox", flag_descriptions::kSearchReadyOmniboxName,
flag_descriptions::kSearchReadyOmniboxDescription, kOsAndroid,
FEATURE_VALUE_TYPE(chrome::android::kSearchReadyOmniboxFeature)},
+#endif
{"site-engagement",
flag_descriptions::kSiteEngagementName,
--
2.25.1
@@ -0,0 +1,29 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:59:30 +0000
Subject: Revert flags: remove num-raster-thre (win fixup)
---
chrome/browser/about_flags.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -355,6 +355,7 @@ const FeatureEntry::Choice kOverlayStrategiesChoices[] = {
"single-fullscreen,single-on-top,underlay"},
};
+#if BUILDFLAG(IS_ANDROID)
const FeatureEntry::Choice kNumRasterThreadsChoices[] = {
{flags_ui::kGenericExperimentChoiceDefault, "", ""},
{flag_descriptions::kNumRasterThreadsOne, blink::switches::kNumRasterThreads, "1"},
@@ -363,6 +364,7 @@ const FeatureEntry::Choice kNumRasterThreadsChoices[] = {
"3"},
{flag_descriptions::kNumRasterThreadsFour, blink::switches::kNumRasterThreads,
"4"}};
+#endif
const FeatureEntry::Choice kTouchTextSelectionStrategyChoices[] = {
{flags_ui::kGenericExperimentChoiceDefault, "", ""},
--
2.25.1
@@ -0,0 +1,256 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 12:49:31 +0000
Subject: Revert the removal to block autoplay (win fixup)
---
chrome/app/settings_strings.grdp | 19 ++++++++++++++++
chrome/browser/resources/settings/icons.html | 2 ++
.../settings/privacy_page/privacy_page.html | 22 +++++++++++++++++++
chrome/browser/resources/settings/route.ts | 1 +
.../resources/settings/settings_routes.ts | 1 +
.../site_settings/category_default_setting.ts | 1 +
.../settings/site_settings/constants.ts | 1 +
.../settings_category_default_radio_group.ts | 1 +
.../settings/site_settings/site_details.html | 5 +++++
.../recent_site_permissions.ts | 2 ++
.../site_settings_page/site_settings_page.ts | 9 ++++++++
.../views/page_info/page_info_view_factory.cc | 3 +++
.../settings_localized_strings_provider.cc | 7 ++++++
.../ui/webui/settings/site_settings_helper.cc | 4 +++-
14 files changed, 77 insertions(+), 1 deletion(-)
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -3658,6 +3658,25 @@
Control how your browsing history is used to personalize Search and more
</message>
+ <message name="IDS_SITE_SETTINGS_AUTOPLAY_TITLE" desc="Description of the autoplay content setting page title.">
+ Autoplay
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_DESCRIPTION" desc="Description of the autoplay content setting.">
+ Allow automatic start of video contents
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_ALLOWED" desc="Label for the enabled option of the autoplay setting.">
+ Autoplay is enabled
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_BLOCKED" desc="Label for the disabled option of the autoplay setting.">
+ Autoplay is disabled
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the autoplay setting.">
+ Allowed to autoplay
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the autoplay setting.">
+ Not allowed to autoplay
+ </message>
+
<if expr="not is_chromeos">
<!-- Import Settings Dialog -->
<message name="IDS_SETTINGS_IMPORT_SETTINGS_TITLE" desc="Dialog title for import dialog.">
diff --git a/chrome/browser/resources/settings/icons.html b/chrome/browser/resources/settings/icons.html
--- a/chrome/browser/resources/settings/icons.html
+++ b/chrome/browser/resources/settings/icons.html
@@ -168,6 +168,8 @@ NOTE: Chrome OS icons go in ./chromeos/os_icons.html.
<g id="local-fonts-off"><path d="M4.83,2H20c1.1,0,2,0.9,2,2v15.17l-2-2V4H6.83L4.83,2z M10.92,6l-0.57,1.52l1.36,1.36l0.23-0.66h0.1l0.54,1.52l3.04,3.04 L13.07,6H10.92z M20.49,23.31L19.17,22H4c-1.1,0-2-0.9-2-2V4.83L0.69,3.51L2.1,2.1l19.8,19.8L20.49,23.31z M17.17,20l-5.07-5.07 H9.58L8.49,18H6.41l2.39-6.37L4,6.83V20H17.17z"></path></g>
<g id="file-handling"><path d="M8 16h8v2H8v-2zm0-4h8v2H8v-2zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z" fill="#5F6368"></path></g>
<g id="file-handling-off"><path d="M13.002 4.001H7.106L5.252 2.148c.232-.094.485-.147.75-.147h8l6 6v8.896l-2-2V9.001h-5v-5z" fill="#5F6368"></path><path d="M16.002 12.001h-.896l.896.896v-.896zM.6 3.45l1.414-1.414 19.94 19.94-1.414 1.414L.6 3.45zM3.986 20.01V6.84l2 2V20.01h11.172l1.765 1.766c-.28.15-.599.234-.937.234H5.976c-1.1 0-1.99-.9-1.99-2z" fill="#5F6368"></path><path d="M9.158 12.01H7.986v2h3.172l-2-2zM13.158 16.01H7.986v2h7.172l-2-2z" fill="#5F6368"></path></g>
+ <g id="autoplay"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"></path></g>
+ <g id="autoplay-off"><path d="M16.25,13.42C16.4,12.97,16.5,12.5,16.5,12c0-1.77-1.02-3.29-2.5-4.03v3.2L16.25,13.42z"></path><path d="M19,12c0,1.21-0.31,2.34-0.85,3.32l1.46,1.46C20.48,15.39,21,13.76,21,12c0-4.28-2.99-7.86-7-8.77v2.06 C16.89,6.15,19,8.83,19,12z"></path><path d="M2.81,2.81L1.39,4.22L6.17,9H3v6h4l5,5v-5.17l3.32,3.32c-0.42,0.23-0.85,0.43-1.32,0.56v2.06c1-0.23,1.94-0.62,2.79-1.15 l2.99,2.99l1.41-1.41L2.81,2.81z"></path><polygon points="12,9.17 12,4 9.41,6.59"></polygon></g>
</defs>
</svg>
</iron-iconset-svg>
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -1004,4 +1004,26 @@
</category-setting-exceptions>
</settings-subpage>
</template>
+ <template is="dom-if" route-path="/content/autoplay" no-search>
+ <settings-subpage page-title="$i18n{siteSettingsAutoplay}"
+ search-label="$i18n{siteSettingsAllSitesSearch}"
+ search-term="{{searchFilter_}}">
+ <div class="content-settings-header secondary">
+ $i18n{siteSettingsAutoplayDescription}
+ </div>
+ <settings-category-default-radio-group
+ category="[[contentSettingsTypesEnum_.AUTOPLAY]]"
+ allow-option-label="$i18n{siteSettingsAutoplayAllowed}"
+ allow-option-icon="settings:autoplay"
+ block-option-label="$i18n{siteSettingsAutoplayBlocked}"
+ block-option-icon="settings:autoplay-off">
+ </settings-category-default-radio-group>
+ <category-setting-exceptions
+ category="[[contentSettingsTypesEnum_.AUTOPLAY]]"
+ block-header="$i18n{siteSettingsAutoplayBlockedExceptions}"
+ allow-header="$i18n{siteSettingsAutoplayAllowedExceptions}"
+ search-filter="[[searchFilter_]]">
+ </category-setting-exceptions>
+ </settings-subpage>
+ </template>
</settings-animated-pages>
diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts
--- a/chrome/browser/resources/settings/route.ts
+++ b/chrome/browser/resources/settings/route.ts
@@ -102,6 +102,7 @@ function addPrivacyChildRoutes(r: Partial<SettingsRoutes>) {
r.SITE_SETTINGS.createChild('windowPlacement');
r.SITE_SETTINGS_FILE_SYSTEM_WRITE = r.SITE_SETTINGS.createChild('filesystem');
r.SITE_SETTINGS_LOCAL_FONTS = r.SITE_SETTINGS.createChild('localFonts');
+ r.SITE_SETTINGS_AUTOPLAY = r.SITE_SETTINGS.createChild('autoplay');
}
/**
diff --git a/chrome/browser/resources/settings/settings_routes.ts b/chrome/browser/resources/settings/settings_routes.ts
--- a/chrome/browser/resources/settings/settings_routes.ts
+++ b/chrome/browser/resources/settings/settings_routes.ts
@@ -95,4 +95,5 @@ export interface SettingsRoutes {
SYNC_ADVANCED: Route;
SYSTEM: Route;
TRIGGERED_RESET_DIALOG: Route;
+ SITE_SETTINGS_AUTOPLAY: Route;
}
diff --git a/chrome/browser/resources/settings/site_settings/category_default_setting.ts b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
--- a/chrome/browser/resources/settings/site_settings/category_default_setting.ts
+++ b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
@@ -195,6 +195,7 @@ export class CategoryDefaultSettingElement extends
case ContentSettingsTypes.PROTOCOL_HANDLERS:
case ContentSettingsTypes.SENSORS:
case ContentSettingsTypes.SOUND:
+ case ContentSettingsTypes.AUTOPLAY:
// "Allowed" vs "Blocked".
this.browserProxy.setDefaultValueForContentType(
this.category,
diff --git a/chrome/browser/resources/settings/site_settings/constants.ts b/chrome/browser/resources/settings/site_settings/constants.ts
--- a/chrome/browser/resources/settings/site_settings/constants.ts
+++ b/chrome/browser/resources/settings/site_settings/constants.ts
@@ -42,6 +42,7 @@ export enum ContentSettingsTypes {
VR = 'vr',
WINDOW_PLACEMENT = 'window-placement',
ZOOM_LEVELS = 'zoom-levels',
+ AUTOPLAY = 'autoplay',
// The following item is not in the C++ kContentSettingsTypeGroupNames, but it
// is used everywhere where ContentSettingsTypes is used in JS.
diff --git a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
--- a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
+++ b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
@@ -139,6 +139,7 @@ export class SettingsCategoryDefaultRadioGroupElement extends
case ContentSettingsTypes.PROTOCOL_HANDLERS:
case ContentSettingsTypes.SENSORS:
case ContentSettingsTypes.SOUND:
+ case ContentSettingsTypes.AUTOPLAY:
// "Allowed" vs "Blocked".
return ContentSetting.ALLOW;
case ContentSettingsTypes.AR:
diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b/chrome/browser/resources/settings/site_settings/site_details.html
--- a/chrome/browser/resources/settings/site_settings/site_details.html
+++ b/chrome/browser/resources/settings/site_settings/site_details.html
@@ -223,4 +223,9 @@
category="[[contentSettingsTypesEnum_.LOCAL_FONTS]]"
icon="settings:local-fonts" label="$i18n{fonts}">
</site-details-permission>
+ <site-details-permission
+ category="[[contentSettingsTypesEnum_.AUTOPLAY]]"
+ icon="settings:federated-identity-api"
+ label="$i18n{siteSettingsFederatedIdentityApi}">
+ </site-details-permission>
</div>
diff --git a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
--- a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
+++ b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
@@ -196,6 +196,8 @@ export class SettingsRecentSitePermissionsElement extends
return this.i18n('siteSettingsFontAccessMidSentence');
case ContentSettingsTypes.IDLE_DETECTION:
return this.i18n('siteSettingsIdleDetectionMidSentence');
+ case ContentSettingsTypes.AUTOPLAY:
+ return this.i18n('siteSettingsAutoplayMidSentence');
default:
return '';
}
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
--- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
+++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
@@ -313,6 +313,14 @@ function getCategoryItemMap(): Map<ContentSettingsTypes, CategoryListItem> {
label: 'siteSettingsZoomLevels',
icon: 'settings:zoom-in',
},
+ {
+ route: routes.SITE_SETTINGS_AUTOPLAY,
+ id: Id.AUTOPLAY,
+ label: 'siteSettingsAutoplay',
+ icon: 'settings:autoplay',
+ enabledLabel: 'siteSettingsAutoplayAllowed',
+ disabledLabel: 'siteSettingsAutoplayBlocked',
+ },
];
categoryItemMap = new Map(categoryList.map(item => [item.id, item]));
@@ -395,6 +403,7 @@ export class SettingsSiteSettingsPageElement extends PolymerElement {
Id.PROTECTED_CONTENT,
Id.MIXEDSCRIPT,
Id.FEDERATED_IDENTITY_API,
+ Id.AUTOPLAY,
]),
};
},
diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
--- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc
+++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
@@ -329,6 +329,9 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon(
case ContentSettingsType::IDLE_DETECTION:
icon = &vector_icons::kDevicesIcon;
break;
+ case ContentSettingsType::AUTOPLAY:
+ icon = &vector_icons::kProtectedContentIcon;
+ break;
default:
// All other |ContentSettingsType|s do not have icons on desktop or are
// not shown in the Page Info bubble.
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2083,6 +2083,13 @@ void AddSearchEnginesStrings(content::WebUIDataSource* html_source) {
void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
Profile* profile) {
static constexpr webui::LocalizedString kLocalizedStrings[] = {
+ {"siteSettingsAutoplay", IDS_SITE_SETTINGS_AUTOPLAY_TITLE},
+ {"siteSettingsAutoplayDescription", IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_DESCRIPTION},
+ {"siteSettingsAutoplayAllowed", IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_ALLOWED},
+ {"siteSettingsAutoplayBlocked", IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_BLOCKED},
+ {"siteSettingsAutoplayAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_ALLOWED_EXCEPTIONS},
+ {"siteSettingsAutoplayBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_AUTOPLAY_BLOCKED_EXCEPTIONS},
+ {"siteSettingsAutoplayMidSentence", IDS_SITE_SETTINGS_TYPE_AUTOPLAY},
{"addSite", IDS_SETTINGS_ADD_SITE},
{"addSiteTitle", IDS_SETTINGS_ADD_SITE_TITLE},
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc
--- a/chrome/browser/ui/webui/settings/site_settings_helper.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc
@@ -115,6 +115,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{ContentSettingsType::FILE_SYSTEM_ACCESS_CHOOSER_DATA,
"file-system-access-handles-data"},
{ContentSettingsType::FEDERATED_IDENTITY_API, "federated-identity-api"},
+ {ContentSettingsType::AUTOPLAY, "autoplay"},
// Add new content settings here if a corresponding Javascript string
// representation for it is not required, for example if the content setting
@@ -126,7 +127,6 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{ContentSettingsType::APP_BANNER, nullptr},
{ContentSettingsType::SITE_ENGAGEMENT, nullptr},
{ContentSettingsType::DURABLE_STORAGE, nullptr},
- {ContentSettingsType::AUTOPLAY, nullptr},
{ContentSettingsType::IMPORTANT_SITE_INFO, nullptr},
{ContentSettingsType::PERMISSION_AUTOBLOCKER_DATA, nullptr},
{ContentSettingsType::ADS_DATA, nullptr},
@@ -446,6 +446,8 @@ const std::vector<ContentSettingsType>& GetVisiblePermissionCategories() {
base_types->push_back(ContentSettingsType::ADS);
}
+ base_types->push_back(ContentSettingsType::AUTOPLAY);
+
initialized = true;
}
--
2.25.1
@@ -0,0 +1,252 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 16:03:16 +0000
Subject: Timezone customization (win fixup)
---
chrome/app/settings_strings.grdp | 19 ++++++++++++++++
chrome/browser/resources/settings/icons.html | 2 ++
.../settings/privacy_page/privacy_page.html | 22 +++++++++++++++++++
chrome/browser/resources/settings/route.ts | 1 +
.../resources/settings/settings_routes.ts | 1 +
.../site_settings/category_default_setting.ts | 1 +
.../settings/site_settings/constants.ts | 1 +
.../settings_category_default_radio_group.ts | 1 +
.../settings/site_settings/site_details.html | 5 +++++
.../recent_site_permissions.ts | 2 ++
.../site_settings_page/site_settings_page.ts | 9 ++++++++
.../views/page_info/page_info_view_factory.cc | 3 +++
.../settings_localized_strings_provider.cc | 7 ++++++
.../ui/webui/settings/site_settings_helper.cc | 1 +
.../core/browser/content_settings_registry.cc | 2 +-
15 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -3696,6 +3696,25 @@
Not allowed to Javascript JIT
</message>
+ <message name="IDS_SITE_SETTINGS_TIMEZONE_OVERRIDE_TITLE" desc="Description of the timezone override content setting page title.">
+ Timezone override
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_DESCRIPTION" desc="Description of the timezone override content setting.">
+ Enable the Timezone override
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_ALLOWED" desc="Label for the enabled option of the timezone override setting.">
+ System Timezone
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_BLOCKED" desc="Label for the disabled option of the timezone override setting.">
+ Random Timezone
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the timezone override setting.">
+ System Timezone override
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the timezone override setting.">
+ Random Timezone override
+ </message>
+
<if expr="not is_chromeos">
<!-- Import Settings Dialog -->
<message name="IDS_SETTINGS_IMPORT_SETTINGS_TITLE" desc="Dialog title for import dialog.">
diff --git a/chrome/browser/resources/settings/icons.html b/chrome/browser/resources/settings/icons.html
--- a/chrome/browser/resources/settings/icons.html
+++ b/chrome/browser/resources/settings/icons.html
@@ -172,6 +172,8 @@ NOTE: Chrome OS icons go in ./chromeos/os_icons.html.
<g id="autoplay-off"><path d="M16.25,13.42C16.4,12.97,16.5,12.5,16.5,12c0-1.77-1.02-3.29-2.5-4.03v3.2L16.25,13.42z"></path><path d="M19,12c0,1.21-0.31,2.34-0.85,3.32l1.46,1.46C20.48,15.39,21,13.76,21,12c0-4.28-2.99-7.86-7-8.77v2.06 C16.89,6.15,19,8.83,19,12z"></path><path d="M2.81,2.81L1.39,4.22L6.17,9H3v6h4l5,5v-5.17l3.32,3.32c-0.42,0.23-0.85,0.43-1.32,0.56v2.06c1-0.23,1.94-0.62,2.79-1.15 l2.99,2.99l1.41-1.41L2.81,2.81z"></path><polygon points="12,9.17 12,4 9.41,6.59"></polygon></g>
<g id="javascript-jit"><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"></path></g>
<g id="javascript-jit-off"><path d="M19.17,12l-4.58-4.59L16,6l6,6l-3.59,3.59L17,14.17L19.17,12z M1.39,4.22l4.19,4.19L2,12l6,6l1.41-1.41L4.83,12L7,9.83 l12.78,12.78l1.41-1.41L2.81,2.81L1.39,4.22z"></path></g>
+ <g id="timezone-override"><path d="M21.72 11.33l-6.644-7.035a.97.97 0 0 0-1.38-.01l-1.67 1.72-1.617-1.712a.97.97 0 0 0-1.38-.01l-6.737 6.935c-.187.191-.29.447-.292.719-.002.272.099.529.28.722l6.644 7.034a.949.949 0 0 0 1.38.011l1.671-1.718 1.615 1.71a.949.949 0 0 0 1.381.01l6.74-6.935a1.054 1.054 0 0 0 .01-1.44zM6.947 12.464l3.657 3.785-.974.98-5.273-5.456 5.349-5.378.929.962-3.677 3.7a.998.998 0 0 0-.292.702 1 1 0 0 0 .28.705zm7.35 4.768l-.931-.963 3.68-3.7a1.012 1.012 0 0 0 .007-1.407l-3.656-3.784.974-.98 5.273 5.456-5.348 5.378z"></path></g>
+ <g id="timezone-override-off"><path d="M7.95,5.12l0.73-0.8C8.88,4.11,9.15,4,9.42,4c0.27,0,0.54,0.11,0.74,0.32L12,6.34l1.85-2.01C14.04,4.11,14.31,4,14.58,4 c0.27,0,0.54,0.11,0.74,0.32l6.42,7c0.35,0.38,0.35,0.97,0,1.35l-2.98,3.25l-1.42-1.42l2.3-2.51l-5.06-5.52l-1.23,1.34l3.21,3.51 c0.35,0.38,0.35,0.97,0,1.35l-0.51,0.56L7.95,5.12z M19.78,22.61l-3.73-3.73l-0.73,0.8c-0.2,0.22-0.47,0.32-0.74,0.32 c-0.27,0-0.54-0.11-0.74-0.32L12,17.66l-1.85,2.01C9.96,19.89,9.69,20,9.42,20c-0.27,0-0.54-0.11-0.74-0.32l-6.42-7 c-0.35-0.38-0.35-0.97,0-1.35l2.98-3.25L1.39,4.22l1.41-1.41l18.38,18.38L19.78,22.61z M10.64,16.18l-3.21-3.51 c-0.35-0.38-0.35-0.97,0-1.35l0.51-0.56L6.66,9.49L4.36,12l5.06,5.52L10.64,16.18z"></path></g>
</defs>
</svg>
</iron-iconset-svg>
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -1048,4 +1048,26 @@
</category-setting-exceptions>
</settings-subpage>
</template>
+ <template is="dom-if" route-path="/content/timezone-override" no-search>
+ <settings-subpage page-title="$i18n{siteSettingsTimezoneOverride}"
+ search-label="$i18n{siteSettingsAllSitesSearch}"
+ search-term="{{searchFilter_}}">
+ <div class="content-settings-header secondary">
+ $i18n{siteSettingsTimezoneOverrideDescription}
+ </div>
+ <settings-category-default-radio-group
+ category="[[contentSettingsTypesEnum_.TIMEZONE_OVERRIDE]]"
+ allow-option-label="$i18n{siteSettingsTimezoneOverrideAllowed}"
+ allow-option-icon="settings:timezone-override"
+ block-option-label="$i18n{siteSettingsTimezoneOverrideBlocked}"
+ block-option-icon="settings:timezone-override-off">
+ </settings-category-default-radio-group>
+ <category-setting-exceptions
+ category="[[contentSettingsTypesEnum_.TIMEZONE_OVERRIDE]]"
+ block-header="$i18n{siteSettingsTimezoneOverrideBlockedExceptions}"
+ allow-header="$i18n{siteSettingsTimezoneOverrideAllowedExceptions}"
+ search-filter="[[searchFilter_]]">
+ </category-setting-exceptions>
+ </settings-subpage>
+ </template>
</settings-animated-pages>
diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts
--- a/chrome/browser/resources/settings/route.ts
+++ b/chrome/browser/resources/settings/route.ts
@@ -104,6 +104,7 @@ function addPrivacyChildRoutes(r: Partial<SettingsRoutes>) {
r.SITE_SETTINGS_LOCAL_FONTS = r.SITE_SETTINGS.createChild('localFonts');
r.SITE_SETTINGS_AUTOPLAY = r.SITE_SETTINGS.createChild('autoplay');
r.SITE_SETTINGS_JAVASCRIPT_JIT = r.SITE_SETTINGS.createChild('javascript-jit');
+ r.SITE_SETTINGS_TIMEZONE_OVERRIDE = r.SITE_SETTINGS.createChild('timezone-override');
}
/**
diff --git a/chrome/browser/resources/settings/settings_routes.ts b/chrome/browser/resources/settings/settings_routes.ts
--- a/chrome/browser/resources/settings/settings_routes.ts
+++ b/chrome/browser/resources/settings/settings_routes.ts
@@ -97,4 +97,5 @@ export interface SettingsRoutes {
TRIGGERED_RESET_DIALOG: Route;
SITE_SETTINGS_AUTOPLAY: Route;
SITE_SETTINGS_JAVASCRIPT_JIT: Route;
+ SITE_SETTINGS_TIMEZONE_OVERRIDE: Route;
}
diff --git a/chrome/browser/resources/settings/site_settings/category_default_setting.ts b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
--- a/chrome/browser/resources/settings/site_settings/category_default_setting.ts
+++ b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
@@ -197,6 +197,7 @@ export class CategoryDefaultSettingElement extends
case ContentSettingsTypes.SOUND:
case ContentSettingsTypes.AUTOPLAY:
case ContentSettingsTypes.JAVASCRIPT_JIT:
+ case ContentSettingsTypes.TIMEZONE_OVERRIDE:
// "Allowed" vs "Blocked".
this.browserProxy.setDefaultValueForContentType(
this.category,
diff --git a/chrome/browser/resources/settings/site_settings/constants.ts b/chrome/browser/resources/settings/site_settings/constants.ts
--- a/chrome/browser/resources/settings/site_settings/constants.ts
+++ b/chrome/browser/resources/settings/site_settings/constants.ts
@@ -44,6 +44,7 @@ export enum ContentSettingsTypes {
ZOOM_LEVELS = 'zoom-levels',
AUTOPLAY = 'autoplay',
JAVASCRIPT_JIT = 'javascript-jit',
+ TIMEZONE_OVERRIDE = 'timezone-override',
// The following item is not in the C++ kContentSettingsTypeGroupNames, but it
// is used everywhere where ContentSettingsTypes is used in JS.
diff --git a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
--- a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
+++ b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
@@ -141,6 +141,7 @@ export class SettingsCategoryDefaultRadioGroupElement extends
case ContentSettingsTypes.SOUND:
case ContentSettingsTypes.AUTOPLAY:
case ContentSettingsTypes.JAVASCRIPT_JIT:
+ case ContentSettingsTypes.TIMEZONE_OVERRIDE:
// "Allowed" vs "Blocked".
return ContentSetting.ALLOW;
case ContentSettingsTypes.AR:
diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b/chrome/browser/resources/settings/site_settings/site_details.html
--- a/chrome/browser/resources/settings/site_settings/site_details.html
+++ b/chrome/browser/resources/settings/site_settings/site_details.html
@@ -233,4 +233,9 @@
icon="settings:javascript-jit"
label="$i18n{siteSettingsJavascriptJIT}">
</site-details-permission>
+ <site-details-permission
+ category="[[contentSettingsTypesEnum_.TIMEZONE_OVERRIDE]]"
+ icon="settings:timezone-override"
+ label="$i18n{siteSettingsTimezoneOverride}">
+ </site-details-permission>
</div>
diff --git a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
--- a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
+++ b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
@@ -200,6 +200,8 @@ export class SettingsRecentSitePermissionsElement extends
return this.i18n('siteSettingsAutoplayMidSentence');
case ContentSettingsTypes.JAVASCRIPT_JIT:
return this.i18n('siteSettingsJavascriptJITMidSentence');
+ case ContentSettingsTypes.TIMEZONE_OVERRIDE:
+ return this.i18n('siteSettingsTimezoneOverrideMidSentence');
default:
return '';
}
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
--- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
+++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
@@ -329,6 +329,14 @@ function getCategoryItemMap(): Map<ContentSettingsTypes, CategoryListItem> {
enabledLabel: 'siteSettingsJavascriptJITAllowed',
disabledLabel: 'siteSettingsJavascriptJITBlocked',
},
+ {
+ route: routes.SITE_SETTINGS_TIMEZONE_OVERRIDE,
+ id: Id.TIMEZONE_OVERRIDE,
+ label: 'siteSettingsTimezoneOverride',
+ icon: 'settings:timezone-override',
+ enabledLabel: 'siteSettingsTimezoneOverrideAllowed',
+ disabledLabel: 'siteSettingsTimezoneOverrideBlocked',
+ },
];
categoryItemMap = new Map(categoryList.map(item => [item.id, item]));
@@ -413,6 +421,7 @@ export class SettingsSiteSettingsPageElement extends PolymerElement {
Id.FEDERATED_IDENTITY_API,
Id.AUTOPLAY,
Id.JAVASCRIPT_JIT,
+ Id.TIMEZONE_OVERRIDE,
]),
};
},
diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
--- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc
+++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
@@ -335,6 +335,9 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon(
case ContentSettingsType::JAVASCRIPT_JIT:
icon = &vector_icons::kCodeIcon;
break;
+ case ContentSettingsType::TIMEZONE_OVERRIDE:
+ icon = &vector_icons::kAccountCircleIcon;
+ break;
default:
// All other |ContentSettingsType|s do not have icons on desktop or are
// not shown in the Page Info bubble.
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2097,6 +2097,13 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
{"siteSettingsJavascriptJITAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_ALLOWED_EXCEPTIONS},
{"siteSettingsJavascriptJITBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_JAVASCRIPT_JIT_BLOCKED_EXCEPTIONS},
{"siteSettingsJavascriptJITMidSentence", IDS_SITE_SETTINGS_TYPE_JAVASCRIPT_JIT},
+ {"siteSettingsTimezoneOverride", IDS_SITE_SETTINGS_TIMEZONE_OVERRIDE_TITLE},
+ {"siteSettingsTimezoneOverrideDescription", IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_DESCRIPTION},
+ {"siteSettingsTimezoneOverrideAllowed", IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_ALLOWED},
+ {"siteSettingsTimezoneOverrideBlocked", IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_BLOCKED},
+ {"siteSettingsTimezoneOverrideAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_ALLOWED_EXCEPTIONS},
+ {"siteSettingsTimezoneOverrideBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_TIMEZONE_OVERRIDE_BLOCKED_EXCEPTIONS},
+ {"siteSettingsTimezoneOverrideMidSentence", IDS_SITE_SETTINGS_TIMEZONE_OVERRIDE_TITLE},
{"addSite", IDS_SETTINGS_ADD_SITE},
{"addSiteTitle", IDS_SETTINGS_ADD_SITE_TITLE},
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc
--- a/chrome/browser/ui/webui/settings/site_settings_helper.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc
@@ -117,6 +117,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{ContentSettingsType::FEDERATED_IDENTITY_API, "federated-identity-api"},
{ContentSettingsType::AUTOPLAY, "autoplay"},
{ContentSettingsType::JAVASCRIPT_JIT, "javascript-jit"},
+ {ContentSettingsType::TIMEZONE_OVERRIDE, "timezone-override"},
// Add new content settings here if a corresponding Javascript string
// representation for it is not required, for example if the content setting
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -673,7 +673,7 @@ void ContentSettingsRegistry::Init() {
CONTENT_SETTING_ASK, // custom timezone, default UTC
CONTENT_SETTING_BLOCK), // random
WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE,
- WebsiteSettingsRegistry::PLATFORM_ANDROID,
+ WebsiteSettingsRegistry::ALL_PLATFORMS,
ContentSettingsInfo::INHERIT_IN_INCOGNITO,
ContentSettingsInfo::PERSISTENT,
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS);
--
2.25.1
@@ -0,0 +1,252 @@
From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 10:10:26 +0000
Subject: Viewport Protection (win fixup)
---
chrome/app/settings_strings.grdp | 19 ++++++++++++++++
chrome/browser/resources/settings/icons.html | 2 ++
.../settings/privacy_page/privacy_page.html | 22 +++++++++++++++++++
chrome/browser/resources/settings/route.ts | 1 +
.../resources/settings/settings_routes.ts | 1 +
.../site_settings/category_default_setting.ts | 1 +
.../settings/site_settings/constants.ts | 1 +
.../settings_category_default_radio_group.ts | 1 +
.../settings/site_settings/site_details.html | 5 +++++
.../recent_site_permissions.ts | 2 ++
.../site_settings_page/site_settings_page.ts | 9 ++++++++
.../views/page_info/page_info_view_factory.cc | 3 +++
.../settings_localized_strings_provider.cc | 7 ++++++
.../ui/webui/settings/site_settings_helper.cc | 1 +
.../core/browser/content_settings_registry.cc | 2 +-
15 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -3753,6 +3753,25 @@
Not allowed to use WebRTC
</message>
+ <message name="IDS_SITE_SETTINGS_VIEWPORT_PROTECTION_TITLE" desc="Description of the viewport protection content setting page title.">
+ Viewport Protection
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_VIEWPORT_PROTECTION_DESCRIPTION" desc="Description of the viewport protection content setting.">
+ Enable Viewport Protection
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_VIEWPORT_PROTECTION_ALLOWED" desc="Label for the enabled option of the viewport protection setting.">
+ Viewport Protection is enabled
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_VIEWPORT_PROTECTION_BLOCKED" desc="Label for the disabled option of the viewport protection setting.">
+ Viewport Protection is disabled
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_VIEWPORT_PROTECTION_ALLOWED_EXCEPTIONS" desc="Label for the allowed exceptions site list of the viewport protection setting.">
+ Allowed to use Viewport Protection
+ </message>
+ <message name="IDS_SETTINGS_SITE_SETTINGS_VIEWPORT_PROTECTION_BLOCKED_EXCEPTIONS" desc="Label for the blocked exceptions site list of the viewport protection setting.">
+ Not allowed to use Viewport Protection
+ </message>
+
<if expr="not is_chromeos">
<!-- Import Settings Dialog -->
<message name="IDS_SETTINGS_IMPORT_SETTINGS_TITLE" desc="Dialog title for import dialog.">
diff --git a/chrome/browser/resources/settings/icons.html b/chrome/browser/resources/settings/icons.html
--- a/chrome/browser/resources/settings/icons.html
+++ b/chrome/browser/resources/settings/icons.html
@@ -178,6 +178,8 @@ NOTE: Chrome OS icons go in ./chromeos/os_icons.html.
<g id="webgl-off"><path d="M13.002 4.001H7.106L5.252 2.148c.232-.094.485-.147.75-.147h8l6 6v8.896l-2-2V9.001h-5v-5z" fill="#5F6368"></path><path d="M16.002 12.001h-.896l.896.896v-.896zM.6 3.45l1.414-1.414 19.94 19.94-1.414 1.414L.6 3.45zM3.986 20.01V6.84l2 2V20.01h11.172l1.765 1.766c-.28.15-.599.234-.937.234H5.976c-1.1 0-1.99-.9-1.99-2z" fill="#5F6368"></path><path d="M9.158 12.01H7.986v2h3.172l-2-2zM13.158 16.01H7.986v2h7.172l-2-2z" fill="#5F6368"></path></g>
<g id="webrtc"><path d="M8 16h8v2H8v-2zm0-4h8v2H8v-2zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z" fill="#5F6368"></path></g>
<g id="webrtc-off"><path d="M13.002 4.001H7.106L5.252 2.148c.232-.094.485-.147.75-.147h8l6 6v8.896l-2-2V9.001h-5v-5z" fill="#5F6368"></path><path d="M16.002 12.001h-.896l.896.896v-.896zM.6 3.45l1.414-1.414 19.94 19.94-1.414 1.414L.6 3.45zM3.986 20.01V6.84l2 2V20.01h11.172l1.765 1.766c-.28.15-.599.234-.937.234H5.976c-1.1 0-1.99-.9-1.99-2z" fill="#5F6368"></path><path d="M9.158 12.01H7.986v2h3.172l-2-2zM13.158 16.01H7.986v2h7.172l-2-2z" fill="#5F6368"></path></g>
+ <g id="viewport-protection"><path d="M8 16h8v2H8v-2zm0-4h8v2H8v-2zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z" fill="#5F6368"></path></g>
+ <g id="viewport-protection-off"><path d="M13.002 4.001H7.106L5.252 2.148c.232-.094.485-.147.75-.147h8l6 6v8.896l-2-2V9.001h-5v-5z" fill="#5F6368"></path><path d="M16.002 12.001h-.896l.896.896v-.896zM.6 3.45l1.414-1.414 19.94 19.94-1.414 1.414L.6 3.45zM3.986 20.01V6.84l2 2V20.01h11.172l1.765 1.766c-.28.15-.599.234-.937.234H5.976c-1.1 0-1.99-.9-1.99-2z" fill="#5F6368"></path><path d="M9.158 12.01H7.986v2h3.172l-2-2zM13.158 16.01H7.986v2h7.172l-2-2z" fill="#5F6368"></path></g>
</defs>
</svg>
</iron-iconset-svg>
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -1114,4 +1114,26 @@
</category-setting-exceptions>
</settings-subpage>
</template>
+ <template is="dom-if" route-path="/content/viewport-protection" no-search>
+ <settings-subpage page-title="$i18n{siteSettingsViewportProtection}"
+ search-label="$i18n{siteSettingsAllSitesSearch}"
+ search-term="{{searchFilter_}}">
+ <div class="content-settings-header secondary">
+ $i18n{siteSettingsViewportProtectionDescription}
+ </div>
+ <settings-category-default-radio-group
+ category="[[contentSettingsTypesEnum_.VIEWPORT]]"
+ allow-option-label="$i18n{siteSettingsViewportProtectionAllowed}"
+ allow-option-icon="settings:viewport-protection"
+ block-option-label="$i18n{siteSettingsViewportProtectionBlocked}"
+ block-option-icon="settings:viewport-protection-off">
+ </settings-category-default-radio-group>
+ <category-setting-exceptions
+ category="[[contentSettingsTypesEnum_.VIEWPORT]]"
+ block-header="$i18n{siteSettingsViewportProtectionBlockedExceptions}"
+ allow-header="$i18n{siteSettingsViewportProtectionAllowedExceptions}"
+ search-filter="[[searchFilter_]]">
+ </category-setting-exceptions>
+ </settings-subpage>
+ </template>
</settings-animated-pages>
diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts
--- a/chrome/browser/resources/settings/route.ts
+++ b/chrome/browser/resources/settings/route.ts
@@ -107,6 +107,7 @@ function addPrivacyChildRoutes(r: Partial<SettingsRoutes>) {
r.SITE_SETTINGS_TIMEZONE_OVERRIDE = r.SITE_SETTINGS.createChild('timezone-override');
r.SITE_SETTINGS_WEBGL = r.SITE_SETTINGS.createChild('webgl');
r.SITE_SETTINGS_WEBRTC = r.SITE_SETTINGS.createChild('webrtc');
+ r.SITE_SETTINGS_VIEWPORT = r.SITE_SETTINGS.createChild('viewport-protection');
}
/**
diff --git a/chrome/browser/resources/settings/settings_routes.ts b/chrome/browser/resources/settings/settings_routes.ts
--- a/chrome/browser/resources/settings/settings_routes.ts
+++ b/chrome/browser/resources/settings/settings_routes.ts
@@ -100,4 +100,5 @@ export interface SettingsRoutes {
SITE_SETTINGS_TIMEZONE_OVERRIDE: Route;
SITE_SETTINGS_WEBGL: Route;
SITE_SETTINGS_WEBRTC: Route;
+ SITE_SETTINGS_VIEWPORT: Route;
}
diff --git a/chrome/browser/resources/settings/site_settings/category_default_setting.ts b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
--- a/chrome/browser/resources/settings/site_settings/category_default_setting.ts
+++ b/chrome/browser/resources/settings/site_settings/category_default_setting.ts
@@ -200,6 +200,7 @@ export class CategoryDefaultSettingElement extends
case ContentSettingsTypes.TIMEZONE_OVERRIDE:
case ContentSettingsTypes.WEBGL:
case ContentSettingsTypes.WEBRTC:
+ case ContentSettingsTypes.VIEWPORT:
// "Allowed" vs "Blocked".
this.browserProxy.setDefaultValueForContentType(
this.category,
diff --git a/chrome/browser/resources/settings/site_settings/constants.ts b/chrome/browser/resources/settings/site_settings/constants.ts
--- a/chrome/browser/resources/settings/site_settings/constants.ts
+++ b/chrome/browser/resources/settings/site_settings/constants.ts
@@ -47,6 +47,7 @@ export enum ContentSettingsTypes {
TIMEZONE_OVERRIDE = 'timezone-override',
WEBGL = 'webgl',
WEBRTC = 'webrtc',
+ VIEWPORT = 'viewport',
// The following item is not in the C++ kContentSettingsTypeGroupNames, but it
// is used everywhere where ContentSettingsTypes is used in JS.
diff --git a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
--- a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
+++ b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts
@@ -144,6 +144,7 @@ export class SettingsCategoryDefaultRadioGroupElement extends
case ContentSettingsTypes.TIMEZONE_OVERRIDE:
case ContentSettingsTypes.WEBGL:
case ContentSettingsTypes.WEBRTC:
+ case ContentSettingsTypes.VIEWPORT:
// "Allowed" vs "Blocked".
return ContentSetting.ALLOW;
case ContentSettingsTypes.AR:
diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b/chrome/browser/resources/settings/site_settings/site_details.html
--- a/chrome/browser/resources/settings/site_settings/site_details.html
+++ b/chrome/browser/resources/settings/site_settings/site_details.html
@@ -248,4 +248,9 @@
icon="settings:webrtc"
label="$i18n{siteSettingsWebRTC}">
</site-details-permission>
+ <site-details-permission
+ category="[[contentSettingsTypesEnum_.VIEWPORT]]"
+ icon="settings:viewport-protection"
+ label="$i18n{siteSettingsViewportProtection}">
+ </site-details-permission>
</div>
diff --git a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
--- a/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
+++ b/chrome/browser/resources/settings/site_settings_page/recent_site_permissions.ts
@@ -206,6 +206,8 @@ export class SettingsRecentSitePermissionsElement extends
return this.i18n('siteSettingsWebglMidSentence');
case ContentSettingsTypes.WEBRTC:
return this.i18n('siteSettingsWebRTCMidSentence');
+ case ContentSettingsTypes.VIEWPORT:
+ return this.i18n('siteSettingsViewportProtectionMidSentence');
default:
return '';
}
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
--- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
+++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts
@@ -353,6 +353,14 @@ function getCategoryItemMap(): Map<ContentSettingsTypes, CategoryListItem> {
enabledLabel: 'siteSettingsWebRTCAllowed',
disabledLabel: 'siteSettingsWebRTCBlocked',
},
+ {
+ route: routes.SITE_SETTINGS_VIEWPORT,
+ id: Id.VIEWPORT,
+ label: 'siteSettingsViewportProtection',
+ icon: 'settings:viewport-protection',
+ enabledLabel: 'siteSettingsViewportProtectionAllowed',
+ disabledLabel: 'siteSettingsViewportProtectionBlocked',
+ },
];
categoryItemMap = new Map(categoryList.map(item => [item.id, item]));
@@ -440,6 +448,7 @@ export class SettingsSiteSettingsPageElement extends PolymerElement {
Id.TIMEZONE_OVERRIDE,
Id.WEBGL,
Id.WEBRTC,
+ Id.VIEWPORT,
]),
};
},
diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
--- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc
+++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
@@ -344,6 +344,9 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon(
case ContentSettingsType::WEBRTC:
icon = &vector_icons::kProtectedContentIcon;
break;
+ case ContentSettingsType::VIEWPORT:
+ icon = &vector_icons::kProtectedContentIcon;
+ break;
default:
// All other |ContentSettingsType|s do not have icons on desktop or are
// not shown in the Page Info bubble.
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -2118,6 +2118,13 @@ void AddSiteSettingsStrings(content::WebUIDataSource* html_source,
{"siteSettingsWebRTCAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_WEBRTC_ALLOWED_EXCEPTIONS},
{"siteSettingsWebRTCBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_WEBRTC_BLOCKED_EXCEPTIONS},
{"siteSettingsWebRTCMidSentence", IDS_SITE_SETTINGS_WEBRTC_TITLE},
+ {"siteSettingsViewportProtection", IDS_SITE_SETTINGS_VIEWPORT_PROTECTION_TITLE},
+ {"siteSettingsViewportProtectionDescription", IDS_SETTINGS_SITE_SETTINGS_VIEWPORT_PROTECTION_DESCRIPTION},
+ {"siteSettingsViewportProtectionAllowed", IDS_SETTINGS_SITE_SETTINGS_VIEWPORT_PROTECTION_ALLOWED},
+ {"siteSettingsViewportProtectionBlocked", IDS_SETTINGS_SITE_SETTINGS_VIEWPORT_PROTECTION_BLOCKED},
+ {"siteSettingsViewportProtectionAllowedExceptions",IDS_SETTINGS_SITE_SETTINGS_VIEWPORT_PROTECTION_ALLOWED_EXCEPTIONS},
+ {"siteSettingsViewportProtectionBlockedExceptions", IDS_SETTINGS_SITE_SETTINGS_VIEWPORT_PROTECTION_BLOCKED_EXCEPTIONS},
+ {"siteSettingsViewportProtectionMidSentence", IDS_SITE_SETTINGS_VIEWPORT_PROTECTION_TITLE},
{"addSite", IDS_SETTINGS_ADD_SITE},
{"addSiteTitle", IDS_SETTINGS_ADD_SITE_TITLE},
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc
--- a/chrome/browser/ui/webui/settings/site_settings_helper.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc
@@ -120,6 +120,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
{ContentSettingsType::TIMEZONE_OVERRIDE, "timezone-override"},
{ContentSettingsType::WEBGL, "webgl"},
{ContentSettingsType::WEBRTC, "webrtc"},
+ {ContentSettingsType::VIEWPORT, "viewport"},
// Add new content settings here if a corresponding Javascript string
// representation for it is not required, for example if the content setting
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -722,7 +722,7 @@ void ContentSettingsRegistry::Init() {
ValidSettings(CONTENT_SETTING_ALLOW,
CONTENT_SETTING_BLOCK),
WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE,
- WebsiteSettingsRegistry::PLATFORM_ANDROID,
+ WebsiteSettingsRegistry::ALL_PLATFORMS,
ContentSettingsInfo::INHERIT_IN_INCOGNITO,
ContentSettingsInfo::PERSISTENT,
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS,
--
2.25.1
@@ -0,0 +1,26 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 11:31:11 +0000
Subject: openH264: enable ARM/ARM64 optimizati (win fixup)
---
.../blink/renderer/modules/mediarecorder/h264_encoder.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc b/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
--- a/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
+++ b/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
@@ -219,9 +219,9 @@ bool H264Encoder::ConfigureEncoderOnEncodingTaskRunner(const gfx::Size& size) {
init_params.iRCMode = RC_OFF_MODE;
}
-#if BUILDFLAG(OS_MACOSX)
- // Threading model: Set to 1 due to https://crbug.com/583348.
- init_params.iMultipleThreadIdc = 1;
+#if BUILDFLAG(IS_MAC)
+ // Threading model: Set to 1 due to https://crbug.com/583348.
+ init_params.iMultipleThreadIdc = 1;
#else
init_params.iMultipleThreadIdc = 0;
#endif
--
2.25.1
@@ -0,0 +1,22 @@
From: Your Name <you@example.com>
Date: Wed, 12 Oct 2022 10:04:39 +0000
Subject: ungoogled-chr: Disable profile avatar (win fixup)
---
chrome/browser/profiles/profile_attributes_storage.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/profiles/profile_attributes_storage.cc b/chrome/browser/profiles/profile_attributes_storage.cc
--- a/chrome/browser/profiles/profile_attributes_storage.cc
+++ b/chrome/browser/profiles/profile_attributes_storage.cc
@@ -800,7 +800,7 @@ void ProfileAttributesStorage::DownloadHighResAvatarIfNeeded(
void ProfileAttributesStorage::DownloadHighResAvatar(
size_t icon_index,
const base::FilePath& profile_path) {
-#if !BUILDFLAG(IS_ANDROID)
+#if false
const char* file_name =
profiles::GetDefaultAvatarIconFileNameAtIndex(icon_index);
DCHECK(file_name);
--
2.25.1
@@ -0,0 +1,107 @@
From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 10:27:15 +0000
Subject: ungoogled-chromium: no special hosts/d (win fixup)
---
components/domain_reliability/BUILD.gn | 47 ++++++++++++++----------
components/domain_reliability/monitor.cc | 8 ----
2 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/components/domain_reliability/BUILD.gn b/components/domain_reliability/BUILD.gn
--- a/components/domain_reliability/BUILD.gn
+++ b/components/domain_reliability/BUILD.gn
@@ -2,11 +2,31 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-action("bake_in_configs") {
+action("bake_in_configs_EXCLUDED") {
visibility = [ ":*" ]
script = "bake_in_configs.py"
inputs = [
+ "baked_in_configs/c_android_clients_google_com.json",
+ "baked_in_configs/c_bigcache_googleapis_com.json",
+ "baked_in_configs/c_doc-0-0-sj_sj_googleusercontent_com.json",
+ "baked_in_configs/c_docs_google_com.json",
+ "baked_in_configs/c_drive_google_com.json",
+ "baked_in_configs/c_googlesyndication_com.json",
+ "baked_in_configs/c_pack_google_com.json",
+ "baked_in_configs/c_play_google_com.json",
+ "baked_in_configs/c_youtube_com.json",
+ "baked_in_configs/clients2_google_com.json",
+ "baked_in_configs/docs_google_com.json",
+ "baked_in_configs/gcp_gvt2_com.json",
+ "baked_in_configs/gcp_gvt6_com.json",
+ "baked_in_configs/google-analytics_com.json",
+ "baked_in_configs/googlevideo_com.json",
+ "baked_in_configs/gvt1_com.json",
+ "baked_in_configs/gvt2_com.json",
+ "baked_in_configs/gvt6_com.json",
+ "baked_in_configs/ssl_gstatic_com.json",
+ "baked_in_configs/www_google_com.json",
]
output_file = "$target_gen_dir/baked_in_configs.cc"
@@ -14,21 +34,13 @@ action("bake_in_configs") {
# The JSON file list is too long for the command line on Windows, so put
# them in a response file.
- if (is_win) {
- args = [
- "--file-list",
- "nul",
- "--output",
- rebase_path(output_file, root_build_dir),
- ]
- } else {
- args = [
- "--file-list",
- "/dev/null",
- "--output",
- rebase_path(output_file, root_build_dir),
- ]
- }
+ response_file_contents = rebase_path(inputs, root_build_dir)
+ args = [
+ "--file-list",
+ "{{response_file_name}}",
+ "--output",
+ rebase_path(output_file, root_build_dir),
+ ]
}
component("domain_reliability") {
@@ -61,12 +73,9 @@ component("domain_reliability") {
"util.cc",
"util.h",
]
- sources += get_target_outputs(":bake_in_configs")
-
defines = [ "DOMAIN_RELIABILITY_IMPLEMENTATION" ]
deps = [
- ":bake_in_configs",
"//base",
"//net",
"//url",
diff --git a/components/domain_reliability/monitor.cc b/components/domain_reliability/monitor.cc
--- a/components/domain_reliability/monitor.cc
+++ b/components/domain_reliability/monitor.cc
@@ -94,14 +94,6 @@ void DomainReliabilityMonitor::Shutdown() {
}
void DomainReliabilityMonitor::AddBakedInConfigs() {
- for (size_t i = 0; kBakedInJsonConfigs[i]; ++i) {
- base::StringPiece json(kBakedInJsonConfigs[i]);
- std::unique_ptr<const DomainReliabilityConfig> config =
- DomainReliabilityConfig::FromJSON(json);
- // Guard against accidentally checking in malformed JSON configs.
- DCHECK(config->IsValid());
- context_manager_.AddContextForConfig(std::move(config));
- }
}
void DomainReliabilityMonitor::SetDiscardUploads(bool discard_uploads) {
--
2.25.1