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

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

Issue 2719403002: Switching to flat_sets in HQP. (Closed)
Patch Set: Created 3 years, 10 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/in_memory_url_index_types.h
diff --git a/components/omnibox/browser/in_memory_url_index_types.h b/components/omnibox/browser/in_memory_url_index_types.h
index 6d38a79f9c7a001b762845cc38cc85175c77e5da..b34d1e6bcf55deee07fcfc6aa61418028fc3cfc4 100644
--- a/components/omnibox/browser/in_memory_url_index_types.h
+++ b/components/omnibox/browser/in_memory_url_index_types.h
@@ -11,6 +11,7 @@
#include <set>
dyaroshev 2017/03/02 22:43:18 Check if <set> can be removed.
#include <vector>
+#include "base/containers/flat_set.h"
#include "base/containers/hash_tables.h"
#include "base/strings/string16.h"
#include "components/history/core/browser/history_types.h"
@@ -69,8 +70,8 @@ TermMatches ReplaceOffsetsInTermMatches(const TermMatches& matches,
// Convenience Types -----------------------------------------------------------
typedef std::vector<base::string16> String16Vector;
-typedef std::set<base::string16> String16Set;
-typedef std::set<base::char16> Char16Set;
+typedef base::flat_set<base::string16> String16Set;
+typedef base::flat_set<base::char16> Char16Set;
typedef std::vector<base::char16> Char16Vector;
// A vector that contains the offsets at which each word starts within a string.
@@ -131,12 +132,12 @@ typedef size_t WordID;
typedef std::map<base::string16, WordID> WordMap;
// A map from character to the word_ids of words containing that character.
-typedef std::set<WordID> WordIDSet; // An index into the WordList.
+typedef base::flat_set<WordID> WordIDSet; // An index into the WordList.
typedef std::map<base::char16, WordIDSet> CharWordIDMap;
// A map from word (by word_id) to history items containing that word.
typedef history::URLID HistoryID;
-typedef std::set<HistoryID> HistoryIDSet;
+typedef base::flat_set<HistoryID> HistoryIDSet;
typedef std::vector<HistoryID> HistoryIDVector;
typedef std::map<WordID, HistoryIDSet> WordIDHistoryMap;
typedef std::map<HistoryID, WordIDSet> HistoryIDWordMap;

Powered by Google App Engine
This is Rietveld 408576698