summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch')
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch
new file mode 100644
index 0000000..5b97e10
--- /dev/null
+++ b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch
@@ -0,0 +1,50 @@
1--- chrome/browser/sharing/features.cc.orig
2+++ chrome/browser/sharing/features.cc
3@@ -32,3 +32,5 @@ const base::Feature kSharingPreferVapid
4 base::FEATURE_DISABLED_BY_DEFAULT
5 #endif // defined(OS_ANDROID)
6 };
7+
8+const base::Feature kDisableQRGenerator{"DisableQRGenerator", base::FEATURE_DISABLED_BY_DEFAULT};
9--- chrome/browser/sharing/features.h.orig
10+++ chrome/browser/sharing/features.h
11@@ -34,4 +34,5 @@ extern const base::Feature kSharingSendV
12 // Feature flag for prefer sending sharing message using VAPID.
13 extern const base::Feature kSharingPreferVapid;
14
15+extern const base::Feature kDisableQRGenerator;
16 #endif // CHROME_BROWSER_SHARING_FEATURES_H_
17--- chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc.orig
18+++ chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
19@@ -23,7 +23,7 @@ QRCodeGeneratorBubbleController::~QRCode
20
21 // static
22 bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) {
23- if (!url.SchemeIsHTTPOrHTTPS())
24+ if (!url.SchemeIsHTTPOrHTTPS() || base::FeatureList::IsEnabled(kDisableQRGenerator))
25 return false;
26
27 return true;
28--- chrome/browser/ui/views/location_bar/location_bar_view.cc.orig
29+++ chrome/browser/ui/views/location_bar/location_bar_view.cc
30@@ -297,7 +297,8 @@ void LocationBarView::Init() {
31 // the left most icon.
32 params.types_enabled.push_back(PageActionIconType::kSendTabToSelf);
33 params.types_enabled.push_back(PageActionIconType::kClickToCall);
34- params.types_enabled.push_back(PageActionIconType::kQRCodeGenerator);
35+ if (!base::FeatureList::IsEnabled(kDisableQRGenerator))
36+ params.types_enabled.push_back(PageActionIconType::kQRCodeGenerator);
37 if (base::FeatureList::IsEnabled(kSharedClipboardUI))
38 params.types_enabled.push_back(PageActionIconType::kSharedClipboard);
39 if (base::FeatureList::IsEnabled(kWebOTPCrossDevice))
40--- chrome/browser/ungoogled_flag_entries.h.orig
41+++ chrome/browser/ungoogled_flag_entries.h
42@@ -72,4 +72,8 @@
43 "Remove Tabsearch Button",
44 "Removes the tabsearch button from the tabstrip. ungoogled-chromium flag",
45 kOsDesktop, SINGLE_VALUE_TYPE("remove-tabsearch-button")},
46+ {"disable-qr-generator",
47+ "Disable QR Generator",
48+ "Disables the QR generator for sharing page links. ungoogled-chromium flag",
49+ kOsDesktop, FEATURE_VALUE_TYPE(kDisableQRGenerator)},
50 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_