diff --git a/build/patches/Do-not-compile-QR-code-sharing.patch b/build/patches/Do-not-compile-QR-code-sharing.patch index c4edd0cc..dc8355c2 100644 --- a/build/patches/Do-not-compile-QR-code-sharing.patch +++ b/build/patches/Do-not-compile-QR-code-sharing.patch @@ -6,10 +6,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/android/BUILD.gn | 1 - .../chrome/browser/ui/RootUiCoordinator.java | 5 ---- + chrome/browser/prefs/browser_prefs.cc | 2 +- chrome/browser/share/BUILD.gn | 1 - ...omeProvidedSharingOptionsProviderBase.java | 23 ------------------- chrome/browser/share/android/java_sources.gni | 11 --------- - 5 files changed, 41 deletions(-) + .../sharing_hub/sharing_hub_features.cc | 2 +- + .../browser/ui/browser_command_controller.cc | 6 ++--- + chrome/browser/ui/browser_commands.cc | 1 + + .../qrcode_generator_bubble_controller.cc | 1 + + 10 files changed, 7 insertions(+), 46 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn @@ -44,6 +49,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi } @Override +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 +@@ -1743,7 +1743,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) { + registry->RegisterBooleanPref(prefs::kUiAutomationProviderEnabled, false); + #endif + +- registry->RegisterBooleanPref(prefs::kQRCodeGeneratorEnabled, true); ++ registry->RegisterBooleanPref(prefs::kQRCodeGeneratorEnabled, false); + + // This is intentionally last. + RegisterLocalStatePrefsForMigration(registry); diff --git a/chrome/browser/share/BUILD.gn b/chrome/browser/share/BUILD.gn --- a/chrome/browser/share/BUILD.gn +++ b/chrome/browser/share/BUILD.gn @@ -123,4 +140,55 @@ diff --git a/chrome/browser/share/android/java_sources.gni b/chrome/browser/shar "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/EditorScreenshotSource.java", "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/EditorScreenshotTask.java", "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotCoordinator.java", +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 +@@ -72,7 +72,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 +@@ -1773,10 +1773,10 @@ void BrowserCommandController::UpdateCommandsForFullscreenMode() { + command_updater_.UpdateCommandEnabled(IDC_CHROME_WHATS_NEW, show_main_ui); + #endif + 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_SHOW_MANAGEMENT_PAGE, true); + +diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc +--- a/chrome/browser/ui/browser_commands.cc ++++ b/chrome/browser/ui/browser_commands.cc +@@ -1649,6 +1649,7 @@ void SendTabToSelf(Browser* browser) { + } + + bool CanGenerateQrCode(const Browser* browser) { ++ if ((true)) return false; + return !sharing_hub::SharingIsDisabledByPolicy(browser->profile()) && + qrcode_generator::QRCodeGeneratorBubbleController:: + IsGeneratorAvailable(browser->tab_strip_model() +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 +@@ -37,6 +37,7 @@ QRCodeGeneratorBubbleController::~QRCodeGeneratorBubbleController() { + + // static + bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) { ++ if ((true)) return false; + if (!url.SchemeIsHTTPOrHTTPS()) + return false; + -- diff --git a/build/patches/WIN-Disable-sharing-hub.patch b/build/patches/WIN-Disable-sharing-hub.patch deleted file mode 100644 index 7b3aaa07..00000000 --- a/build/patches/WIN-Disable-sharing-hub.patch +++ /dev/null @@ -1,64 +0,0 @@ -From: uazo -Date: Fri, 17 Feb 2023 16:22:00 +0000 -Subject: WIN Disable sharing hub - -License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html ---- - chrome/browser/sharing_hub/sharing_hub_features.cc | 2 +- - chrome/browser/ui/browser_command_controller.cc | 6 +++--- - chrome/browser/ui/browser_commands.cc | 1 + - .../qrcode_generator/qrcode_generator_bubble_controller.cc | 1 + - 4 files changed, 6 insertions(+), 4 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 -@@ -72,7 +72,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 -@@ -1773,10 +1773,10 @@ void BrowserCommandController::UpdateCommandsForFullscreenMode() { - command_updater_.UpdateCommandEnabled(IDC_CHROME_WHATS_NEW, show_main_ui); - #endif - 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_SHOW_MANAGEMENT_PAGE, true); - -diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc ---- a/chrome/browser/ui/browser_commands.cc -+++ b/chrome/browser/ui/browser_commands.cc -@@ -1649,6 +1649,7 @@ void SendTabToSelf(Browser* browser) { - } - - bool CanGenerateQrCode(const Browser* browser) { -+ if ((true)) return false; - return !sharing_hub::SharingIsDisabledByPolicy(browser->profile()) && - qrcode_generator::QRCodeGeneratorBubbleController:: - IsGeneratorAvailable(browser->tab_strip_model() -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 -@@ -37,6 +37,7 @@ QRCodeGeneratorBubbleController::~QRCodeGeneratorBubbleController() { - - // static - bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) { -+ if ((true)) return false; - if (!url.SchemeIsHTTPOrHTTPS()) - return false; - ---