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

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

Issue 2337953002: Optimizing HQP using vectors manually. This is just a CL to be able (Closed)
Patch Set: Created 4 years, 3 months 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
Index: components/omnibox/browser/url_index_private_data.h
diff --git a/components/omnibox/browser/url_index_private_data.h b/components/omnibox/browser/url_index_private_data.h
index 100692cd7b44e63de9bfbc2b01c3501a6e2bbd95..a3f1c4a3dab70f4df6b431fde272b4d8c13782f2 100644
--- a/components/omnibox/browser/url_index_private_data.h
+++ b/components/omnibox/browser/url_index_private_data.h
@@ -172,16 +172,15 @@ class URLIndexPrivateData
// characters in the prefix by returning the |word_id_set|. In that case we do
// not mark the item as being |used_|.
struct SearchTermCacheItem {
- SearchTermCacheItem(const WordIDSet& word_id_set,
- const HistoryIDSet& history_id_set);
+ SearchTermCacheItem(WordIDVector word_id_set, HistoryIDVector history_ids);
// Creates a cache item for a term which has no results.
SearchTermCacheItem();
SearchTermCacheItem(const SearchTermCacheItem& other);
~SearchTermCacheItem();
- WordIDSet word_id_set_;
- HistoryIDSet history_id_set_;
+ WordIDVector word_id_set_;
+ HistoryIDVector history_id_set_;
bool used_; // True if this item has been used for the current term search.
};
typedef std::map<base::string16, SearchTermCacheItem> SearchTermCacheMap;
@@ -237,10 +236,10 @@ class URLIndexPrivateData
// Helper function to HistoryIDSetFromWords which composes a set of history
// ids for the given term given in |term|.
- HistoryIDSet HistoryIDsForTerm(const base::string16& term);
+ HistoryIDVector HistoryIDsForTerm(const base::string16& term);
// Given a set of Char16s, finds words containing those characters.
- WordIDSet WordIDSetForTermChars(const Char16Set& term_chars);
+ WordIDVector WordIDSetForTermChars(const Char16Set& term_chars);
// Indexes one URL history item as described by |row|. Returns true if the
// row was actually indexed. |scheme_whitelist| is used to filter
« no previous file with comments | « components/omnibox/browser/in_memory_url_index_types.h ('k') | components/omnibox/browser/url_index_private_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698