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

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

Issue 2719403002: Switching to flat_sets in HQP. (Closed)
Patch Set: Review, round 1. 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
« no previous file with comments | « no previous file | components/omnibox/browser/url_index_private_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d3e656ca85c67169aeae28f39b3abe2a1fd151c9 100644
--- a/components/omnibox/browser/in_memory_url_index_types.h
+++ b/components/omnibox/browser/in_memory_url_index_types.h
@@ -8,9 +8,9 @@
#include <stddef.h>
#include <map>
-#include <set>
#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 +69,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 +131,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;
« no previous file with comments | « no previous file | components/omnibox/browser/url_index_private_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698