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

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

Issue 2873423002: Omnibox UI Experiments: Add flag to change max autocomplete matches. (Closed)
Patch Set: fix merge' Created 3 years, 7 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 | « components/omnibox/browser/omnibox_field_trial.cc ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/search_provider.cc
diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc
index 98e697c4dda6b03a19f2dea5ac204b7aa3013473..5dca14c15128e076b077b6546c88f4f0920a3f60 100644
--- a/components/omnibox/browser/search_provider.cc
+++ b/components/omnibox/browser/search_provider.cc
@@ -1045,11 +1045,11 @@ void SearchProvider::ConvertResultsToAutocompleteMatches() {
// that set a legal default match if possible. If Instant Extended is enabled
// and we have server-provided (and thus hopefully more accurate) scores for
// some suggestions, we allow more of those, until we reach
- // AutocompleteResult::kMaxMatches total matches (that is, enough to fill the
- // whole popup).
+ // AutocompleteResult::GetMaxMatches() total matches (that is, enough to fill
+ // the whole popup).
//
// We will always return any verbatim matches, no matter how we obtained their
- // scores, unless we have already accepted AutocompleteResult::kMaxMatches
+ // scores, unless we have already accepted AutocompleteResult::GetMaxMatches()
// higher-scoring matches under the conditions above.
std::sort(matches.begin(), matches.end(), &AutocompleteMatch::MoreRelevant);
@@ -1073,7 +1073,7 @@ void SearchProvider::ConvertResultsToAutocompleteMatches() {
size_t num_suggestions = 0;
for (ACMatches::const_iterator i(matches.begin());
(i != matches.end()) &&
- (matches_.size() < AutocompleteResult::kMaxMatches);
+ (matches_.size() < AutocompleteResult::GetMaxMatches());
++i) {
// SEARCH_OTHER_ENGINE is only used in the SearchProvider for the keyword
// verbatim result, so this condition basically means "if this match is a
« no previous file with comments | « components/omnibox/browser/omnibox_field_trial.cc ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698