Commit bedfe9fc authored by David Bienvenu's avatar David Bienvenu Committed by Commit Bot

Fix Linux omnibox handling of text with schemes

Fixes a regression in Linux handling of omnibox text like dict:word.
Regression caused omnibox to default to treating it as a url. This
CL makes Linux default to treating it as search text.

Regression introduced in https://chromium-review.googlesource.com/c/chromium/src/+/966896

Bug: 838570
Change-Id: I26be4279605ded6e3aed4e631f503e2b60551283
Reviewed-on: https://chromium-review.googlesource.com/1040881Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555829}
parent 9f06503b
......@@ -59,6 +59,12 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme(
return metrics::OmniboxInputType::QUERY;
case ExternalProtocolHandler::UNKNOWN: {
#if defined(OS_LINUX)
// Linux impl of GetApplicationNameForProtocol doesn't distinguish
// between URL schemes with handers and those without. This will
// make the default behaviour be search on Linux.
return metrics::OmniboxInputType::INVALID;
#endif // defined(OS_LINUX)
// If block state is unknown, check if there is an application registered
// for the url scheme.
GURL url(scheme + "://");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment