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

Side by Side Diff: chrome/browser/history/scored_history_match.h

Issue 11416285: Omnibiox: Tweak HQP New Scoring and Re-Enable Field Trial (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_HISTORY_SCORED_HISTORY_MATCH_H_ 5 #ifndef CHROME_BROWSER_HISTORY_SCORED_HISTORY_MATCH_H_
6 #define CHROME_BROWSER_HISTORY_SCORED_HISTORY_MATCH_H_ 6 #define CHROME_BROWSER_HISTORY_SCORED_HISTORY_MATCH_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Pre-calculates days_ago_to_recency_numerator_, used in 108 // Pre-calculates days_ago_to_recency_numerator_, used in
109 // GetRecencyScore(). 109 // GetRecencyScore().
110 static void FillInDaysAgoToRecencyScoreArray(); 110 static void FillInDaysAgoToRecencyScoreArray();
111 111
112 // Returns a popularity score based on |typed_count| and 112 // Returns a popularity score based on |typed_count| and
113 // |visit_count|. 113 // |visit_count|.
114 static float GetPopularityScore(int typed_count, 114 static float GetPopularityScore(int typed_count,
115 int visit_count); 115 int visit_count);
116 116
117 // Combines the three component scores into a final score that's
118 // an appropriate value to use as a relevancy score.
119 static float GetFinalRelevancyScore(
120 float topicality_score,
121 float recency_score,
122 float popularity_score);
123
117 // Sets use_new_scoring based on command line flags and/or 124 // Sets use_new_scoring based on command line flags and/or
118 // field trial state. 125 // field trial state.
119 static void InitializeNewScoringField(); 126 static void InitializeNewScoringField();
120 127
121 // Sets only_count_matches_at_word_boundaries based on the field trial state. 128 // Sets only_count_matches_at_word_boundaries based on the field trial state.
122 static void InitializeOnlyCountMatchesAtWordBoundariesField(); 129 static void InitializeOnlyCountMatchesAtWordBoundariesField();
123 130
124 // Sets also_do_hup_like_scoring based on the field trial state. 131 // Sets also_do_hup_like_scoring based on the field trial state.
125 static void InitializeAlsoDoHUPLikeScoringField(); 132 static void InitializeAlsoDoHUPLikeScoringField();
126 133
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // a score that's similar to the score HistoryURL provider would assign). 178 // a score that's similar to the score HistoryURL provider would assign).
172 // This variable is set in the constructor by examining the field trial 179 // This variable is set in the constructor by examining the field trial
173 // state. 180 // state.
174 static bool also_do_hup_like_scoring; 181 static bool also_do_hup_like_scoring;
175 }; 182 };
176 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches; 183 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches;
177 184
178 } // namespace history 185 } // namespace history
179 186
180 #endif // CHROME_BROWSER_HISTORY_SCORED_HISTORY_MATCH_H_ 187 #endif // CHROME_BROWSER_HISTORY_SCORED_HISTORY_MATCH_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_field_trial.cc ('k') | chrome/browser/history/scored_history_match.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698