Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Unified Diff: components/omnibox/browser/autocomplete_input.cc

Issue 2378213002: Mark URLs with empty schemes as invalid. (Closed)
Patch Set: Comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/omnibox/browser/autocomplete_input_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/autocomplete_input.cc
diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnibox/browser/autocomplete_input.cc
index 7207fc8b5e68ba44e4e354bbc79b4f3317e4d5d1..26a8c7d0f34a1bb70d358f02d0ee768a68f2cf83 100644
--- a/components/omnibox/browser/autocomplete_input.cc
+++ b/components/omnibox/browser/autocomplete_input.cc
@@ -254,13 +254,6 @@ metrics::OmniboxInputType::Type AutocompleteInput::Parse(
// between an HTTP URL and a query, or the scheme is HTTP or HTTPS, in which
// case we should reject invalid formulations.
- // If we have an empty host it can't be a valid HTTP[S] URL. (This should
- // only trigger for input that begins with a colon, which GURL will parse as a
- // valid, non-standard URL; for standard URLs, an empty host would have
- // resulted in an invalid |canonicalized_url| above.)
- if (!canonicalized_url->has_host())
- return metrics::OmniboxInputType::QUERY;
-
// Determine the host family. We get this information by (re-)canonicalizing
// the already-canonicalized host rather than using the user's original input,
// in case fixup affected the result here (e.g. an input that looks like an
« no previous file with comments | « no previous file | components/omnibox/browser/autocomplete_input_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698