mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 00:14:20 +09:00
now all chromium patches in all helium repos follow the same dir pattern: `<vendor>/<group>/<...>/<patch>` and there's no longer a "contrib" dir which was admittedly kind of confusing
50 lines
2.0 KiB
C++
50 lines
2.0 KiB
C++
--- a/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
|
|
+++ b/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
|
|
@@ -13,6 +13,7 @@
|
|
#include "chrome/common/pref_names.h"
|
|
#include "components/prefs/pref_change_registrar.h"
|
|
#include "components/prefs/pref_service.h"
|
|
+#include "components/sharing_message/features.h"
|
|
#include "content/public/browser/web_contents.h"
|
|
#include "url/gurl.h"
|
|
|
|
@@ -38,7 +39,7 @@ QRCodeGeneratorBubbleController::~QRCode
|
|
|
|
// static
|
|
bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) {
|
|
- if (!url.SchemeIsHTTPOrHTTPS()) {
|
|
+ if (!url.SchemeIsHTTPOrHTTPS() || base::FeatureList::IsEnabled(kDisableQRGenerator)) {
|
|
return false;
|
|
}
|
|
|
|
--- a/chrome/browser/ungoogled_flag_entries.h
|
|
+++ b/chrome/browser/ungoogled_flag_entries.h
|
|
@@ -64,4 +64,8 @@
|
|
"Remove Tabsearch Button",
|
|
"Removes the tabsearch button from the tabstrip. ungoogled-chromium flag",
|
|
kOsDesktop, SINGLE_VALUE_TYPE("remove-tabsearch-button")},
|
|
+ {"disable-qr-generator",
|
|
+ "Disable QR Generator",
|
|
+ "Disables the QR generator for sharing page links. ungoogled-chromium flag",
|
|
+ kOsDesktop, FEATURE_VALUE_TYPE(kDisableQRGenerator)},
|
|
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
|
|
--- a/components/sharing_message/features.cc
|
|
+++ b/components/sharing_message/features.cc
|
|
@@ -7,6 +7,8 @@
|
|
#include "build/build_config.h"
|
|
#include "components/sync_preferences/features.h"
|
|
|
|
+BASE_FEATURE(kDisableQRGenerator, "DisableQRGenerator", base::FEATURE_DISABLED_BY_DEFAULT);
|
|
+
|
|
BASE_FEATURE(kClickToCall, base::FEATURE_DISABLED_BY_DEFAULT);
|
|
|
|
BASE_FEATURE(kMobilePromoOnDesktop, base::FEATURE_DISABLED_BY_DEFAULT);
|
|
--- a/components/sharing_message/features.h
|
|
+++ b/components/sharing_message/features.h
|
|
@@ -34,4 +34,5 @@ MobilePromoOnDesktopPromoType MobileProm
|
|
// notification arm, false otherwise.
|
|
bool IsMobilePromoOnDesktopNotificationsEnabled();
|
|
|
|
+BASE_DECLARE_FEATURE(kDisableQRGenerator);
|
|
#endif // COMPONENTS_SHARING_MESSAGE_FEATURES_H_
|