disable-formatting-in-omnibox.patch 1.5 KB

123456789101112131415161718192021222324252627282930
  1. # Disables omission of URL elements in Omnibox
  2. # except for the mailto scheme so that email links can be properly
  3. # formatted when copied to clipboard (#2225).
  4. --- a/components/url_formatter/url_formatter.cc
  5. +++ b/components/url_formatter/url_formatter.cc
  6. @@ -533,15 +533,15 @@ bool HasTwoViewSourceSchemes(base::Strin
  7. } // namespace
  8. const FormatUrlType kFormatUrlOmitNothing = 0;
  9. -const FormatUrlType kFormatUrlOmitUsernamePassword = 1 << 0;
  10. -const FormatUrlType kFormatUrlOmitHTTP = 1 << 1;
  11. -const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 1 << 2;
  12. -const FormatUrlType kFormatUrlOmitHTTPS = 1 << 3;
  13. -const FormatUrlType kFormatUrlOmitTrivialSubdomains = 1 << 5;
  14. -const FormatUrlType kFormatUrlTrimAfterHost = 1 << 6;
  15. -const FormatUrlType kFormatUrlOmitFileScheme = 1 << 7;
  16. +const FormatUrlType kFormatUrlOmitUsernamePassword = 0 << 0;
  17. +const FormatUrlType kFormatUrlOmitHTTP = 0 << 1;
  18. +const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 0 << 2;
  19. +const FormatUrlType kFormatUrlOmitHTTPS = 0 << 3;
  20. +const FormatUrlType kFormatUrlOmitTrivialSubdomains = 0 << 5;
  21. +const FormatUrlType kFormatUrlTrimAfterHost = 0 << 6;
  22. +const FormatUrlType kFormatUrlOmitFileScheme = 0 << 7;
  23. const FormatUrlType kFormatUrlOmitMailToScheme = 1 << 8;
  24. -const FormatUrlType kFormatUrlOmitMobilePrefix = 1 << 9;
  25. +const FormatUrlType kFormatUrlOmitMobilePrefix = 0 << 9;
  26. const FormatUrlType kFormatUrlOmitDefaults =
  27. kFormatUrlOmitUsernamePassword | kFormatUrlOmitHTTP |