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

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

Issue 169463011: Omnibox: Fixes Allow-To-Be-Default-Match Code for HistoryQuick Provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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_quick_provider.cc
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc
index 0dddbd8177b93dd51536cff94d0eaf8320093150..0f0405f918c96770f95cfec4c0708713fcf5016a 100644
--- a/chrome/browser/autocomplete/history_quick_provider.cc
+++ b/chrome/browser/autocomplete/history_quick_provider.cc
@@ -277,9 +277,7 @@ AutocompleteMatch HistoryQuickProvider::QuickMatchToACMatch(
match.contents_class =
SpansFromTermMatch(new_matches, match.contents.length(), true);
- match.allowed_to_be_default_match = history_match.can_inline() &&
- !PreventInlineAutocomplete(autocomplete_input_);
- if (match.allowed_to_be_default_match) {
+ if (history_match.can_inline()) {
DCHECK(!new_matches.empty());
size_t inline_autocomplete_offset = new_matches[0].offset +
new_matches[0].length;
@@ -291,6 +289,8 @@ AutocompleteMatch HistoryQuickProvider::QuickMatchToACMatch(
match.inline_autocompletion =
match.fill_into_edit.substr(inline_autocomplete_offset);
}
+ match.allowed_to_be_default_match = match.inline_autocompletion.empty() ||
+ !PreventInlineAutocomplete(autocomplete_input_);
}
// Format the description autocomplete presentation.

Powered by Google App Engine
This is Rietveld 408576698