summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/network_action_predictor.h
diff options
context:
space:
mode:
authordominich@chromium.org <dominich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-12 21:58:08 +0000
committerdominich@chromium.org <dominich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-12 21:58:08 +0000
commitd219c1d13a2df2f575685d8ad836eaaec55b742c (patch)
treefa5d7beb3d9bfa4a950c2aaf42fe780774e1eb21 /chrome/browser/autocomplete/network_action_predictor.h
parent37643b3f7f528924c22e9fc38fac3972adf9b308 (diff)
downloadchromium_src-d219c1d13a2df2f575685d8ad836eaaec55b742c.zip
chromium_src-d219c1d13a2df2f575685d8ad836eaaec55b742c.tar.gz
chromium_src-d219c1d13a2df2f575685d8ad836eaaec55b742c.tar.bz2
Track confidence calculations better. Reduce minimum user text length.
Database sizes are low so it is safe to reduce the minimum user text length. This should increase coverage. To help track potential coverage increases, it is good to remove trivial 0 confidences from the histogram of confidences. BUG=107212,107213 Review URL: http://codereview.chromium.org/8870006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/network_action_predictor.h')
-rw-r--r--chrome/browser/autocomplete/network_action_predictor.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/autocomplete/network_action_predictor.h b/chrome/browser/autocomplete/network_action_predictor.h
index cbab039..f881307 100644
--- a/chrome/browser/autocomplete/network_action_predictor.h
+++ b/chrome/browser/autocomplete/network_action_predictor.h
@@ -146,9 +146,12 @@ class NetworkActionPredictor
bool TryDeleteOldEntries(HistoryService* service);
// Uses local caches to calculate an exact percentage prediction that the user
- // will take a particular match given what they have typed.
- double ExactAlgorithm(const string16& user_text,
- const AutocompleteMatch& match) const;
+ // will take a particular match given what they have typed. |is_in_db| is set
+ // to differentiate trivial zero results resulting from a match not being
+ // found from actual zero results where the calculation returns 0.0.
+ double CalculateConfidence(const string16& user_text,
+ const AutocompleteMatch& match,
+ bool* is_in_db) const;
// Adds a row to the database and caches.
void AddRow(const DBCacheKey& key,