OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // Support for InMemoryURLIndex Private Data ----------------------------------- | 125 // Support for InMemoryURLIndex Private Data ----------------------------------- |
126 | 126 |
127 // An index into a list of all of the words we have indexed. | 127 // An index into a list of all of the words we have indexed. |
128 typedef size_t WordID; | 128 typedef size_t WordID; |
129 | 129 |
130 // A map allowing a WordID to be determined given a word. | 130 // A map allowing a WordID to be determined given a word. |
131 typedef std::map<base::string16, WordID> WordMap; | 131 typedef std::map<base::string16, WordID> WordMap; |
132 | 132 |
133 // A map from character to the word_ids of words containing that character. | 133 // A map from character to the word_ids of words containing that character. |
134 typedef std::set<WordID> WordIDSet; // An index into the WordList. | 134 typedef std::set<WordID> WordIDSet; // An index into the WordList. |
| 135 typedef std::vector<WordID> WordIDVector; |
135 typedef std::map<base::char16, WordIDSet> CharWordIDMap; | 136 typedef std::map<base::char16, WordIDSet> CharWordIDMap; |
136 | 137 |
137 // A map from word (by word_id) to history items containing that word. | 138 // A map from word (by word_id) to history items containing that word. |
138 typedef history::URLID HistoryID; | 139 typedef history::URLID HistoryID; |
139 typedef std::set<HistoryID> HistoryIDSet; | 140 typedef std::set<HistoryID> HistoryIDSet; |
140 typedef std::vector<HistoryID> HistoryIDVector; | 141 typedef std::vector<HistoryID> HistoryIDVector; |
141 typedef std::map<WordID, HistoryIDSet> WordIDHistoryMap; | 142 typedef std::map<WordID, HistoryIDSet> WordIDHistoryMap; |
142 typedef std::map<HistoryID, WordIDSet> HistoryIDWordMap; | 143 typedef std::map<HistoryID, WordIDSet> HistoryIDWordMap; |
143 | 144 |
144 | 145 |
(...skipping 25 matching lines...) Expand all Loading... |
170 | 171 |
171 // Clears both url_word_starts_ and title_word_starts_. | 172 // Clears both url_word_starts_ and title_word_starts_. |
172 void Clear(); | 173 void Clear(); |
173 | 174 |
174 WordStarts url_word_starts_; | 175 WordStarts url_word_starts_; |
175 WordStarts title_word_starts_; | 176 WordStarts title_word_starts_; |
176 }; | 177 }; |
177 typedef std::map<HistoryID, RowWordStarts> WordStartsMap; | 178 typedef std::map<HistoryID, RowWordStarts> WordStartsMap; |
178 | 179 |
179 #endif // COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_ | 180 #endif // COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_ |
OLD | NEW |