Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to disable sharing qr code generator #1574

Closed
networkException opened this issue Jul 21, 2021 · 3 comments
Closed

Add flag to disable sharing qr code generator #1574

networkException opened this issue Jul 21, 2021 · 3 comments

Comments

@networkException
Copy link
Member

Is your feature request related to a problem? Please describe.
In chromium versions prior to 92 there existed a flag to disable the then recently introduced qr code generator for sharing. Personally the addition of the corresponding context menu entry as well as omnibar icon does not add any value to the browser and I would prefer to have a choice to disable them.

Describe the solution you'd like
The addition of a flag to remove ui elements for the sharing qr code generator.

Describe alternatives you've considered
N/A

Additional context
N/A

@Ahrotahn
Copy link
Contributor

I can group this in with the PR for the tabsearch button removal patch once I get them set up.
Until then the feature can be removed by applying this patch:

--- a/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
+++ b/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
@@ -22,10 +22,7 @@
 
 // static
 bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) {
-  if (!url.SchemeIsHTTPOrHTTPS())
     return false;
-
-  return true;
 }
 
 // static
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -245,7 +245,6 @@
     // the left most icon.
     params.types_enabled.push_back(PageActionIconType::kSendTabToSelf);
     params.types_enabled.push_back(PageActionIconType::kClickToCall);
-    params.types_enabled.push_back(PageActionIconType::kQRCodeGenerator);
     if (base::FeatureList::IsEnabled(kSharedClipboardUI))
       params.types_enabled.push_back(PageActionIconType::kSharedClipboard);
     if (base::FeatureList::IsEnabled(kWebOTPCrossDevice))

@networkException
Copy link
Member Author

amazing, thank you!

@BachoSeven
Copy link

I think this can be closed since #1591 was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants