LeOSium_webview/LeOS/patches/00WIN-Disable-sharing-hub.p...

70 lines
3.3 KiB
Diff
Raw Permalink Normal View History

2023-11-18 11:46:19 +01:00
From: uazo <uazo@users.noreply.github.com>
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 | 5 +----
4 files changed, 6 insertions(+), 8 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
@@ -73,7 +73,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
@@ -1708,10 +1708,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);
command_updater_.UpdateCommandEnabled(IDC_FOLLOW, show_main_ui);
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
@@ -1556,6 +1556,7 @@ void SendTabToSelfFromPageAction(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
@@ -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