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

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

Issue 353223002: Omnibox: Fix URL-What-You-Typed Allowed-To-Be-Default-Match Issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix crashes on about: schemes Created 6 years, 5 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/search_provider.cc
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index adc0de3ba1b3d218e8193421c34d29598596467d..7d375ce60c9bd8c1f6be24168f3f5dbba2decd21 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -1129,10 +1129,12 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
// that we're not preventing, make sure we didn't trim any whitespace.
// We don't want to claim http://foo.com/bar is inlineable against the
// input "foo.com/b ".
- match.allowed_to_be_default_match = navigation.IsInlineable(input) &&
+ match.allowed_to_be_default_match = (prefix != NULL) &&
(providers_.GetKeywordProviderURL() == NULL) &&
(match.inline_autocompletion.empty() ||
(!input_.prevent_inline_autocomplete() && !trimmed_whitespace));
+ match.EnsureUWYTIsAllowedToBeDefault(
+ input_.canonicalized_url(), providers_.template_url_service());
match.contents = navigation.match_contents();
match.contents_class = navigation.match_contents_class();

Powered by Google App Engine
This is Rietveld 408576698