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 0ba1bbecc29e1c3ab38e385e3a921ec4b1b9431c..b9f2a93ea945bc2e73e33afdb396d0bd0ef8a975 100644 |
--- a/components/omnibox/browser/url_index_private_data.cc |
+++ b/components/omnibox/browser/url_index_private_data.cc |
@@ -599,7 +599,8 @@ HistoryIDSet URLIndexPrivateData::HistoryIDsForTerm( |
word_history_id_set.end()); |
} |
} |
- HistoryIDSet history_id_set(buffer.begin(), buffer.end()); |
+ HistoryIDSet history_id_set(buffer.begin(), buffer.end(), |
+ base::KEEP_FIRST_OF_DUPES); |
// Record a new cache entry for this word if the term is longer than |
// a single character. |
@@ -1089,7 +1090,8 @@ bool URLIndexPrivateData::RestoreCharWordMap( |
return false; |
base::char16 uni_char = static_cast<base::char16>(entry.char_16()); |
const RepeatedField<int32_t>& word_ids = entry.word_id(); |
- char_word_map_[uni_char] = {word_ids.begin(), word_ids.end()}; |
+ char_word_map_[uni_char] = |
+ WordIDSet(word_ids.begin(), word_ids.end(), base::KEEP_FIRST_OF_DUPES); |
} |
return true; |
} |
@@ -1110,7 +1112,8 @@ bool URLIndexPrivateData::RestoreWordIDHistoryMap( |
return false; |
WordID word_id = entry.word_id(); |
const RepeatedField<int64_t>& history_ids = entry.history_id(); |
- word_id_history_map_[word_id] = {history_ids.begin(), history_ids.end()}; |
+ word_id_history_map_[word_id] = HistoryIDSet( |
+ history_ids.begin(), history_ids.end(), base::KEEP_FIRST_OF_DUPES); |
for (HistoryID history_id : history_ids) |
history_id_word_map_[history_id].insert(word_id); |
} |