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

Unified Diff: chrome/browser/autocomplete/search_provider.cc

Issue 7607007: Add confidence to AutocompleteMatch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/search_provider.cc
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index 2bbda0bb2b06a35660046f72c1cd8f65b6866d67..7eeddac7fe2ec3cc7e4c6103b57fbf205ae3ca0d 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -816,7 +816,10 @@ void SearchProvider::AddMatchToMap(const string16& query_string,
bool is_keyword,
bool prevent_inline_autocomplete,
MatchMap* map) {
- AutocompleteMatch match(this, relevance, false, type);
+ // TODO(dominich): Confidence. In this case, the confidence must depend on the
+ // source. Scored terms can be calculated based on score, but other sources
+ // need more care. Eg, suggest.
+ AutocompleteMatch match(this, relevance, 0.0f, false, type);
std::vector<size_t> content_param_offsets;
const TemplateURL& provider = is_keyword ? providers_.keyword_provider() :
providers_.default_provider();
@@ -917,7 +920,8 @@ AutocompleteMatch SearchProvider::NavigationToMatch(
bool is_keyword) {
const string16& input_text =
is_keyword ? keyword_input_text_ : input_.text();
- AutocompleteMatch match(this, relevance, false,
+ // TODO(dominich): Confidence calculation.
+ AutocompleteMatch match(this, relevance, 0.0f, false,
AutocompleteMatch::NAVSUGGEST);
match.destination_url = navigation.url;
match.contents =
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698