Chromium Code Reviews| Index: components/omnibox/browser/url_index_private_data.cc |
| diff --git a/components/omnibox/browser/url_index_private_data.cc b/components/omnibox/browser/url_index_private_data.cc |
| index a702948211f91be9e6200e557d338118999c1ef8..bc31c7014cdfe956f22366fc3b0d73809d7115ae 100644 |
| --- a/components/omnibox/browser/url_index_private_data.cc |
| +++ b/components/omnibox/browser/url_index_private_data.cc |
| @@ -714,12 +714,13 @@ void URLIndexPrivateData::HistoryIdSetToScoredMatches( |
| } |
| // Score the matches. |
| + const size_t num_matches = history_id_set.size(); |
| const base::Time now = base::Time::Now(); |
| std::transform( |
| history_id_set.begin(), history_id_set.end(), |
| std::back_inserter(*scored_items), |
| [this, &lower_raw_string, &lower_raw_terms, |
| - &lower_terms_to_word_starts_offsets, &bookmark_model, |
| + &lower_terms_to_word_starts_offsets, &bookmark_model, &num_matches, |
| &now](const HistoryID history_id) { |
|
Peter Kasting
2016/12/01 07:07:53
Nit: Bleh, I'm inclined to replace this huge list
Mark P
2016/12/04 01:06:42
Done.
|
| auto hist_pos = history_info_map_.find(history_id); |
| const history::URLRow& hist_item = hist_pos->second.url_row; |
| @@ -730,7 +731,7 @@ void URLIndexPrivateData::HistoryIdSetToScoredMatches( |
| lower_raw_terms, lower_terms_to_word_starts_offsets, |
| starts_pos->second, |
| bookmark_model && bookmark_model->IsBookmarked(hist_item.url()), |
| - now); |
| + num_matches, now); |
| }); |
| // Filter all matches that ended up scoring 0. (These are usually matches |