add WIN-Disable-sharing-hub and WIN-Enable-Network-Service-Sandbox-and-CIG

This commit is contained in:
Carmelo Messina
2023-02-17 17:29:24 +01:00
parent 6396527f6e
commit f7b8fdc542
3 changed files with 96 additions and 0 deletions
+2
View File
@@ -283,6 +283,8 @@ Add-kill-switch-for-unsupported-clangd-flags.patch
00WIN-enable-HighEfficiencyMode-by-default.patch
00WIN-enable-file-system-access-blocklist.patch
00WIN-Fix-windows-build.patch
00WIN-Disable-sharing-hub.patch
00WIN-Enable-Network-Service-Sandbox-and-CIG.patch
00Temp-Disable-kAutomaticLazyFrameLoadingToEmbeds.patch
00temporary-fix-libaom-build-error.patch
@@ -0,0 +1,59 @@
From: Your Name <you@example.com>
Date: Fri, 17 Feb 2023 16:22:00 +0000
Subject: WIN Disable sharing hub
---
chrome/browser/sharing_hub/sharing_hub_features.cc | 2 +-
chrome/browser/ui/browser_command_controller.cc | 8 ++++----
.../qrcode_generator_bubble_controller.cc | 5 +----
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/chrome/browser/sharing_hub/sharing_hub_features.cc b/chrome/browser/sharing_hub/sharing_hub_features.cc
--- a/chrome/browser/sharing_hub/sharing_hub_features.cc
+++ b/chrome/browser/sharing_hub/sharing_hub_features.cc
@@ -70,7 +70,7 @@ BASE_FEATURE(kDesktopScreenshots,
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
void RegisterProfilePrefs(PrefRegistrySimple* registry) {
- registry->RegisterBooleanPref(prefs::kDesktopSharingHubEnabled, true);
+ registry->RegisterBooleanPref(prefs::kDesktopSharingHubEnabled, false);
}
#endif
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -1499,12 +1499,12 @@ void BrowserCommandController::UpdateCommandsForFullscreenMode() {
command_updater_.UpdateCommandEnabled(IDC_CHROME_TIPS, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_CHROME_WHATS_NEW, show_main_ui);
#endif
- command_updater_.UpdateCommandEnabled(IDC_QRCODE_GENERATOR, show_main_ui);
+ command_updater_.UpdateCommandEnabled(IDC_QRCODE_GENERATOR, false);
command_updater_.UpdateCommandEnabled(IDC_CONTENT_CONTEXT_SHARING_SUBMENU,
- show_main_ui);
- command_updater_.UpdateCommandEnabled(IDC_SHARING_HUB, show_main_ui);
+ false);
+ command_updater_.UpdateCommandEnabled(IDC_SHARING_HUB, false);
command_updater_.UpdateCommandEnabled(IDC_SHARING_HUB_SCREENSHOT,
- show_main_ui);
+ false);
command_updater_.UpdateCommandEnabled(IDC_SHOW_APP_MENU, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_SEND_TAB_TO_SELF, show_main_ui);
command_updater_.UpdateCommandEnabled(IDC_SHOW_MANAGEMENT_PAGE, true);
diff --git a/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc b/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
--- a/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
+++ b/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
@@ -23,10 +23,7 @@ QRCodeGeneratorBubbleController::~QRCodeGeneratorBubbleController() {
// static
bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) {
- if (!url.SchemeIsHTTPOrHTTPS())
- return false;
-
- return true;
+ return false;
}
// static
--
2.25.1
@@ -0,0 +1,35 @@
From: Your Name <you@example.com>
Date: Fri, 17 Feb 2023 16:23:20 +0000
Subject: WIN Enable Network Service Sandbox and CIG
---
chrome/browser/chrome_content_browser_client.cc | 2 +-
sandbox/policy/features.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -719,7 +719,7 @@ BASE_FEATURE(kRendererCodeIntegrity,
// https://blogs.windows.com/blog/tag/code-integrity-guard/.
BASE_FEATURE(kNetworkServiceCodeIntegrity,
"NetworkServiceCodeIntegrity",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
#endif // BUILDFLAG(IS_WIN) && !defined(COMPONENT_BUILD) &&
// !defined(ADDRESS_SANITIZER)
diff --git a/sandbox/policy/features.cc b/sandbox/policy/features.cc
--- a/sandbox/policy/features.cc
+++ b/sandbox/policy/features.cc
@@ -15,7 +15,7 @@ namespace sandbox::policy::features {
// (Only causes an effect when feature kNetworkService is enabled.)
BASE_FEATURE(kNetworkServiceSandbox,
"NetworkServiceSandbox",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
#endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_FUCHSIA)
#if BUILDFLAG(IS_WIN)
--
2.25.1