Index: chrome/browser/autocomplete/history_contents_provider.h |
diff --git a/chrome/browser/autocomplete/history_contents_provider.h b/chrome/browser/autocomplete/history_contents_provider.h |
index 7ceb0b90639758ce5eff2c5d683d37af39068001..ce31ec38c7f7178b6e943f3e724585de6ffb5fcb 100644 |
--- a/chrome/browser/autocomplete/history_contents_provider.h |
+++ b/chrome/browser/autocomplete/history_contents_provider.h |
@@ -9,6 +9,8 @@ |
#include "chrome/browser/autocomplete/history_provider.h" |
#include "chrome/browser/history/history.h" |
+struct MatchReference; |
Peter Kasting
2011/08/09 20:53:00
Nit: Shouldn't this be moved inside HistoryContent
dominich
2011/08/09 21:43:43
I went back and forward on this a couple of times.
|
+ |
namespace bookmark_utils { |
struct TitleMatch; |
} |
@@ -45,8 +47,7 @@ class HistoryContentsProvider : public HistoryProvider { |
void ConvertResults(); |
// Creates and returns an AutocompleteMatch from a MatchingPageResult. |
- AutocompleteMatch ResultToMatch(const history::URLResult& result, |
- int score); |
+ AutocompleteMatch ResultToMatch(const MatchReference& match_reference); |
// Adds ACMatchClassifications to match from the offset positions in |
// page_result. |
@@ -57,6 +58,12 @@ class HistoryContentsProvider : public HistoryProvider { |
// chart in autocomplete.h for the list of values this returns. |
int CalculateRelevance(const history::URLResult& result); |
+ // Calculates and returns the confidence for a particular result. This is |
+ // calculated by comparing the result's |visit_count| to that of all the |
+ // results. |
+ float CalculateConfidence(const history::URLResult& result, |
+ const history::QueryResults& results) const; |
+ |
// Queries the bookmarks for any bookmarks whose title matches input. All |
// matches are added directly to results_. |
void QueryBookmarks(const AutocompleteInput& input); |