summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 01:13:41 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 01:13:41 +0000
commit0be9b61912c94843c1cba2f51ddae5acd50370a7 (patch)
tree48c04d442b281b2ff0e73f1f4a2ef995cbd849fe /chrome/browser/autocomplete/autocomplete.cc
parent3e50576e9fb97b64f2971171b8b96e62296eb23b (diff)
downloadchromium_src-0be9b61912c94843c1cba2f51ddae5acd50370a7.zip
chromium_src-0be9b61912c94843c1cba2f51ddae5acd50370a7.tar.gz
chromium_src-0be9b61912c94843c1cba2f51ddae5acd50370a7.tar.bz2
Remove --omnibox-popup-count flag.
BUG=40083 TEST=compiles Review URL: http://codereview.chromium.org/2013008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47482 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc
index ba37681..341afa2 100644
--- a/chrome/browser/autocomplete/autocomplete.cc
+++ b/chrome/browser/autocomplete/autocomplete.cc
@@ -547,7 +547,7 @@ void AutocompleteMatch::ValidateClassifications(
// AutocompleteProvider -------------------------------------------------------
// static
-size_t AutocompleteProvider::max_matches_ = 3;
+const size_t AutocompleteProvider::kMaxMatches = 3;
AutocompleteProvider::~AutocompleteProvider() {
Stop();
@@ -608,7 +608,7 @@ std::wstring AutocompleteProvider::StringForURLDisplay(
// AutocompleteResult ---------------------------------------------------------
// static
-size_t AutocompleteResult::max_matches_ = 6;
+const size_t AutocompleteResult::kMaxMatches = 6;
void AutocompleteResult::Selection::Clear() {
destination_url = GURL();
@@ -619,7 +619,7 @@ void AutocompleteResult::Selection::Clear() {
AutocompleteResult::AutocompleteResult() {
// Reserve space for the max number of matches we'll show. The +1 accounts
// for the history shortcut match as it isn't included in max_matches.
- matches_.reserve(max_matches() + 1);
+ matches_.reserve(kMaxMatches + 1);
// It's probably safe to do this in the initializer list, but there's little
// penalty to doing it here and it ensures our object is fully constructed
@@ -667,10 +667,10 @@ void AutocompleteResult::SortAndCull(const AutocompleteInput& input) {
matches_.end());
// Find the top max_matches.
- if (matches_.size() > max_matches()) {
- std::partial_sort(matches_.begin(), matches_.begin() + max_matches(),
+ if (matches_.size() > kMaxMatches) {
+ std::partial_sort(matches_.begin(), matches_.begin() + kMaxMatches,
matches_.end(), &AutocompleteMatch::MoreRelevant);
- matches_.erase(matches_.begin() + max_matches(), matches_.end());
+ matches_.erase(matches_.begin() + kMaxMatches, matches_.end());
}
// HistoryContentsProvider uses a negative relevance as a way to avoid