summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/history_quick_provider.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-31 21:05:48 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-31 21:05:48 +0000
commit9e1800753fe8be454d23d2ac24e84f238645d3f7 (patch)
treec318f5892d9801039b27802c2bd273b3991d8b5d /chrome/browser/autocomplete/history_quick_provider.cc
parent42cd4c3c6243cff6e6c665e83c552d28d6a1665c (diff)
downloadchromium_src-9e1800753fe8be454d23d2ac24e84f238645d3f7.zip
chromium_src-9e1800753fe8be454d23d2ac24e84f238645d3f7.tar.gz
chromium_src-9e1800753fe8be454d23d2ac24e84f238645d3f7.tar.bz2
Remove a static initializer in the HQP.
BUG=94925 TEST=none Review URL: http://codereview.chromium.org/7740071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99036 0039d316-1c4b-4281-b951-d872f2087c98
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;