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

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

Issue 1009973005: Omnibox: Fix Scoring Bugs in URLs from History (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/scored_history_match.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Buckets: vector[(0.0, 400),(1.5,600),(12.0,1300),(20.0,1399)] 154 // Buckets: vector[(0.0, 400),(1.5,600),(12.0,1300),(20.0,1399)]
155 // Returns false, in case if it fail to parse the string. 155 // Returns false, in case if it fail to parse the string.
156 static bool GetHQPBucketsFromString( 156 static bool GetHQPBucketsFromString(
157 const std::string& buckets_str, 157 const std::string& buckets_str,
158 std::vector<ScoreMaxRelevance>* hqp_buckets); 158 std::vector<ScoreMaxRelevance>* hqp_buckets);
159 159
160 // Untyped visits to bookmarked pages score this, compared to 1 for 160 // Untyped visits to bookmarked pages score this, compared to 1 for
161 // untyped visits to non-bookmarked pages and 20 for typed visits. 161 // untyped visits to non-bookmarked pages and 20 for typed visits.
162 static int bookmark_value_; 162 static int bookmark_value_;
163 163
164 // True if we should fix certain bugs in frequency scoring.
165 static bool fix_frequency_bugs_;
166
164 // If true, we allow input terms to match in the TLD (e.g., ".com"). 167 // If true, we allow input terms to match in the TLD (e.g., ".com").
165 static bool allow_tld_matches_; 168 static bool allow_tld_matches_;
166 169
167 // If true, we allow input terms to match in the scheme (e.g., "http://"). 170 // If true, we allow input terms to match in the scheme (e.g., "http://").
168 static bool allow_scheme_matches_; 171 static bool allow_scheme_matches_;
169 172
170 // True, if hqp experimental scoring is enabled. 173 // True, if hqp experimental scoring is enabled.
171 static bool hqp_experimental_scoring_enabled_; 174 static bool hqp_experimental_scoring_enabled_;
172 175
173 // |topicality_threshold_| is used to control the topicality scoring. 176 // |topicality_threshold_| is used to control the topicality scoring.
174 // If |topicality_threshold_| > 0, then URLs with topicality-score < threshold 177 // If |topicality_threshold_| > 0, then URLs with topicality-score < threshold
175 // are given topicality score of 0. By default it is initalized to -1. 178 // are given topicality score of 0. By default it is initalized to -1.
176 static float topicality_threshold_; 179 static float topicality_threshold_;
177 180
178 // |hqp_relevance_buckets_| gives mapping from (topicality*frequency) 181 // |hqp_relevance_buckets_| gives mapping from (topicality*frequency)
179 // to the final relevance scoring. Please see GetFinalRelevancyScore() 182 // to the final relevance scoring. Please see GetFinalRelevancyScore()
180 // for more details and scoring method. 183 // for more details and scoring method.
181 static std::vector<ScoreMaxRelevance>* hqp_relevance_buckets_; 184 static std::vector<ScoreMaxRelevance>* hqp_relevance_buckets_;
182 }; 185 };
183 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches; 186 typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches;
184 187
185 #endif // CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_ 188 #endif // CHROME_BROWSER_AUTOCOMPLETE_SCORED_HISTORY_MATCH_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/scored_history_match.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698