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

Unified Diff: chrome/browser/autocomplete/history_url_provider.cc

Issue 226283009: Make AutocompleteInput::Parse() more strict: return QUERY for all inputs that (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 8 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
Index: chrome/browser/autocomplete/history_url_provider.cc
===================================================================
--- chrome/browser/autocomplete/history_url_provider.cc (revision 261885)
+++ chrome/browser/autocomplete/history_url_provider.cc (working copy)
@@ -509,7 +509,6 @@
// Otherwise, this is just low-quality noise. In the cases where we've parsed
// as UNKNOWN, we'll still show an accidental search infobar if need be.
bool have_what_you_typed_match =
- params->input.canonicalized_url().is_valid() &&
(params->input.type() != AutocompleteInput::QUERY) &&
((params->input.type() != AutocompleteInput::UNKNOWN) ||
(classifier.type() == VisitClassifier::UNVISITED_INTRANET) ||
@@ -701,8 +700,7 @@
const bool trim_http = !AutocompleteInput::HasHTTPScheme(input.text());
// Don't do this for queries -- while we can sometimes mark up a match for
// this, it's not what the user wants, and just adds noise.
- if ((input.type() != AutocompleteInput::QUERY) &&
- input.canonicalized_url().is_valid()) {
+ if (input.type() != AutocompleteInput::QUERY) {
AutocompleteMatch what_you_typed(SuggestExactInput(
input.text(), input.canonicalized_url(), trim_http));
what_you_typed.relevance = CalculateRelevance(WHAT_YOU_TYPED, 0);

Powered by Google App Engine
This is Rietveld 408576698