Chromium Code Reviews| Index: chrome/browser/predictors/autocomplete_action_predictor.cc |
| diff --git a/chrome/browser/predictors/autocomplete_action_predictor.cc b/chrome/browser/predictors/autocomplete_action_predictor.cc |
| index a64d04fa7f243917b293569cb228ade78e91a553..8a2f65c44785d028b391d4058d195e922ae61e81 100644 |
| --- a/chrome/browser/predictors/autocomplete_action_predictor.cc |
| +++ b/chrome/browser/predictors/autocomplete_action_predictor.cc |
| @@ -75,8 +75,6 @@ namespace predictors { |
| const int AutocompleteActionPredictor::kMaximumDaysToKeepEntry = 14; |
| -double AutocompleteActionPredictor::hit_weight_ = 1.0; |
| - |
| AutocompleteActionPredictor::AutocompleteActionPredictor(Profile* profile) |
| : profile_(profile), |
| table_(PredictorDatabaseFactory::GetForProfile( |
| @@ -242,8 +240,7 @@ void AutocompleteActionPredictor::OnOmniboxOpenedUrl( |
| const AutocompleteMatch& match = log.result.match_at(log.selected_index); |
| UMA_HISTOGRAM_BOOLEAN( |
| - StringPrintf("Prerender.OmniboxNavigationsCouldPrerender_%.1f%s", |
|
cbentzel
2012/05/25 16:34:34
Do you plan to obsolete these in histograms.xml?
dominich
2012/05/25 16:54:57
Actually I'll remove them if they're even there. T
|
| - get_hit_weight(), |
| + StringPrintf("Prerender.OmniboxNavigationsCouldPrerender_%s", |
| prerender::PrerenderManager::GetModeString()).c_str(), |
| prerender::IsOmniboxEnabled(profile_)); |
| @@ -424,7 +421,7 @@ double AutocompleteActionPredictor::CalculateConfidenceForDbEntry( |
| if (value.number_of_hits < kMinimumNumberOfHits) |
| return 0.0; |
| - const double number_of_hits = value.number_of_hits * hit_weight_; |
| + const double number_of_hits = static_cast<double>(value.number_of_hits); |
|
cbentzel
2012/05/25 16:34:34
Do you actually need the explicit cast here? Manti
dominich
2012/05/25 16:54:57
A preference to be explicit.
const double a = som
|
| return number_of_hits / (number_of_hits + value.number_of_misses); |
| } |