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

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

Issue 2013008: Remove --omnibox-popup-count flag. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: nits Created 10 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 | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/history_url_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/history_contents_provider.cc
diff --git a/chrome/browser/autocomplete/history_contents_provider.cc b/chrome/browser/autocomplete/history_contents_provider.cc
index 1e72ceb595af4a8e95634a59c08fda7681e81c32..5ad20c5fb23451896b61b7bf0644e8b1a273a48d 100644
--- a/chrome/browser/autocomplete/history_contents_provider.cc
+++ b/chrome/browser/autocomplete/history_contents_provider.cc
@@ -174,12 +174,12 @@ void HistoryContentsProvider::ConvertResults() {
// This is done to avoid having the history search shortcut show
// 'See 1 previously viewed ...'.
//
- // Note that AutocompleteResult::max_matches() (maximum size of the popup)
- // is different than both max_matches (the provider's maximum) and
+ // Note that AutocompleteResult::kMaxMatches (maximum size of the popup)
+ // is different than both kMaxMatches (the provider's maximum) and
// kMaxMatchCount (the number of items we want from the history).
- size_t max_for_popup = std::min(AutocompleteResult::max_matches() + 1,
+ size_t max_for_popup = std::min(AutocompleteResult::kMaxMatches + 1,
result_refs.size());
- size_t max_for_provider = std::min(max_matches(), result_refs.size());
+ size_t max_for_provider = std::min(kMaxMatches, result_refs.size());
std::partial_sort(result_refs.begin(), result_refs.begin() + max_for_popup,
result_refs.end(), &CompareMatchRelevance);
matches_.clear();
@@ -265,7 +265,7 @@ void HistoryContentsProvider::QueryBookmarks(const AutocompleteInput& input) {
TimeTicks start_time = TimeTicks::Now();
std::vector<bookmark_utils::TitleMatch> matches;
- bookmark_model->GetBookmarksWithTitlesMatching(input.text(), max_matches(),
+ bookmark_model->GetBookmarksWithTitlesMatching(input.text(), kMaxMatches,
&matches);
for (size_t i = 0; i < matches.size(); ++i)
AddBookmarkTitleMatchToResults(matches[i]);
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698