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

Unified Diff: components/omnibox/browser/url_index_private_data.cc

Issue 2545603002: Small fixes for url_index_private_data.cc (Closed)
Patch Set: Created 4 years 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..87bdd3b50da8f397a1bbe36b1971c81d93344189 100644
--- a/components/omnibox/browser/url_index_private_data.cc
+++ b/components/omnibox/browser/url_index_private_data.cc
@@ -253,7 +253,7 @@ ScoredHistoryMatches URLIndexPrivateData::HistoryItemsForTerms(
for (SearchTermCacheMap::iterator cache_iter = search_term_cache_.begin();
cache_iter != search_term_cache_.end(); ) {
if (!cache_iter->second.used_)
- search_term_cache_.erase(cache_iter++);
+ cache_iter = search_term_cache_.erase(cache_iter);
else
++cache_iter;
}
@@ -497,6 +497,7 @@ URLIndexPrivateData::~URLIndexPrivateData() {}
HistoryIDSet URLIndexPrivateData::HistoryIDSetFromWords(
const String16Vector& unsorted_words) {
+ SCOPED_UMA_HISTOGRAM_TIMER("Omnibox.HistoryIDSetFromWords");
Peter Kasting 2016/11/30 21:39:50 Double-checking: the existing omnibox provider tim
// Break the terms down into individual terms (words), get the candidate
// set for each term, and intersect each to get a final candidate list.
// Note that a single 'term' from the user's perspective might be
@@ -605,7 +606,7 @@ HistoryIDSet URLIndexPrivateData::HistoryIDsForTerm(
for (WordIDSet::iterator word_set_iter = word_id_set.begin();
word_set_iter != word_id_set.end(); ) {
if (word_list_[*word_set_iter].find(term) == base::string16::npos)
- word_id_set.erase(word_set_iter++);
+ word_set_iter = word_id_set.erase(word_set_iter);
else
++word_set_iter;
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698