summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/history_quick_provider.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autocomplete/history_quick_provider.cc')
-rw-r--r--chrome/browser/autocomplete/history_quick_provider.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc
index d1ac04c..8a96c52 100644
--- a/chrome/browser/autocomplete/history_quick_provider.cc
+++ b/chrome/browser/autocomplete/history_quick_provider.cc
@@ -110,7 +110,7 @@ void HistoryQuickProvider::DoAutocomplete() {
// |max_match_score|. Upon use of |max_match_score| it is decremented.
// All subsequent matches must be clamped to retain match results ordering.
int max_match_score = autocomplete_input_.prevent_inline_autocomplete() ?
- kMaxNonInliningScore : -1;
+ (AutocompleteResult::kLowestDefaultScore - 1) : -1;
for (ScoredHistoryMatches::const_iterator match_iter = matches.begin();
match_iter != matches.end(); ++match_iter) {
const ScoredHistoryMatch& history_match(*match_iter);
@@ -126,10 +126,6 @@ void HistoryQuickProvider::DoAutocomplete() {
}
}
-// static
-const int HistoryQuickProvider::kMaxNonInliningScore =
- AutocompleteResult::kLowestDefaultScore - 1;
-
AutocompleteMatch HistoryQuickProvider::QuickMatchToACMatch(
const ScoredHistoryMatch& history_match,
const ScoredHistoryMatches& history_matches,
@@ -202,7 +198,8 @@ int HistoryQuickProvider::CalculateRelevance(
// at the beginning of the result's URL and there is exactly one substring
// match in the URL.
int score = (history_match.can_inline) ? history_match.raw_score :
- std::min(kMaxNonInliningScore, history_match.raw_score);
+ std::min(AutocompleteResult::kLowestDefaultScore - 1,
+ history_match.raw_score);
*max_match_score = ((*max_match_score < 0) ?
score : std::min(score, *max_match_score)) - 1;
return *max_match_score + 1;