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

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

Issue 18878007: Omnibox: Make the Controller Reorder Matches for Inlining (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 2f304504aedc799592c70a674e19c82aaa784837..8cba2e88a246ac3a2c5962817570dfcde1fad87d 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -255,7 +255,9 @@ SearchProvider::SearchProvider(AutocompleteProviderListener* listener,
prevent_search_history_inlining_(
OmniboxFieldTrial::SearchHistoryPreventInlining()),
disable_search_history_(
- OmniboxFieldTrial::SearchHistoryDisable()) {
+ OmniboxFieldTrial::SearchHistoryDisable()),
+ omnibox_will_reorder_for_inlining_(
+ OmniboxFieldTrial::InReorderForInliningGroup()) {
}
// static
@@ -1125,7 +1127,7 @@ void SearchProvider::UpdateMatches() {
keyword_results_.verbatim_relevance = -1;
ConvertResultsToAutocompleteMatches();
}
- if (IsTopMatchNotInlinable()) {
+ if (!omnibox_will_reorder_for_inlining_ && IsTopMatchNotInlinable()) {
// Disregard suggested relevances if the top match is not a verbatim match
// or inlinable. For example, input "foo" should not invoke a search for
// "bar", which would happen if the "bar" search match outranked all other
@@ -1136,7 +1138,7 @@ void SearchProvider::UpdateMatches() {
DCHECK(!IsTopMatchNavigationInKeywordMode());
DCHECK(!IsTopMatchScoreTooLow());
DCHECK(!IsTopMatchHighRankSearchForURL());
- DCHECK(!IsTopMatchNotInlinable());
+ DCHECK(omnibox_will_reorder_for_inlining_ || !IsTopMatchNotInlinable());
}
UpdateStarredStateOfMatches();

Powered by Google App Engine
This is Rietveld 408576698