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

Side by Side Diff: components/omnibox/browser/in_memory_url_index_types.h

Issue 1728033002: components: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 typedef std::set<HistoryID> HistoryIDSet; 143 typedef std::set<HistoryID> HistoryIDSet;
144 typedef std::vector<HistoryID> HistoryIDVector; 144 typedef std::vector<HistoryID> HistoryIDVector;
145 typedef std::map<WordID, HistoryIDSet> WordIDHistoryMap; 145 typedef std::map<WordID, HistoryIDSet> WordIDHistoryMap;
146 typedef std::map<HistoryID, WordIDSet> HistoryIDWordMap; 146 typedef std::map<HistoryID, WordIDSet> HistoryIDWordMap;
147 147
148 148
149 // Information used in scoring a particular URL. 149 // Information used in scoring a particular URL.
150 typedef std::vector<history::VisitInfo> VisitInfoVector; 150 typedef std::vector<history::VisitInfo> VisitInfoVector;
151 struct HistoryInfoMapValue { 151 struct HistoryInfoMapValue {
152 HistoryInfoMapValue(); 152 HistoryInfoMapValue();
153 HistoryInfoMapValue(const HistoryInfoMapValue& other);
153 ~HistoryInfoMapValue(); 154 ~HistoryInfoMapValue();
154 155
155 // This field is always populated. 156 // This field is always populated.
156 history::URLRow url_row; 157 history::URLRow url_row;
157 158
158 // This field gets filled in asynchronously after a visit. As such, 159 // This field gets filled in asynchronously after a visit. As such,
159 // it's almost always correct. If it's wrong, it's likely to either 160 // it's almost always correct. If it's wrong, it's likely to either
160 // be empty (if this URL was recently added to the index) or 161 // be empty (if this URL was recently added to the index) or
161 // slightly out-of-date (one visit behind). 162 // slightly out-of-date (one visit behind).
162 VisitInfoVector visits; 163 VisitInfoVector visits;
163 }; 164 };
164 165
165 // A map from history_id to the history's URL and title. 166 // A map from history_id to the history's URL and title.
166 typedef base::hash_map<HistoryID, HistoryInfoMapValue> HistoryInfoMap; 167 typedef base::hash_map<HistoryID, HistoryInfoMapValue> HistoryInfoMap;
167 168
168 // A map from history_id to URL and page title word start metrics. 169 // A map from history_id to URL and page title word start metrics.
169 struct RowWordStarts { 170 struct RowWordStarts {
170 RowWordStarts(); 171 RowWordStarts();
172 RowWordStarts(const RowWordStarts& other);
171 ~RowWordStarts(); 173 ~RowWordStarts();
172 174
173 // Clears both url_word_starts_ and title_word_starts_. 175 // Clears both url_word_starts_ and title_word_starts_.
174 void Clear(); 176 void Clear();
175 177
176 WordStarts url_word_starts_; 178 WordStarts url_word_starts_;
177 WordStarts title_word_starts_; 179 WordStarts title_word_starts_;
178 }; 180 };
179 typedef std::map<HistoryID, RowWordStarts> WordStartsMap; 181 typedef std::map<HistoryID, RowWordStarts> WordStartsMap;
180 182
181 #endif // COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_ 183 #endif // COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698