OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "components/search_engines/util.h" | 5 #include "components/search_engines/util.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 prepopulated_url->SetShortName(original_turl->short_name()); | 175 prepopulated_url->SetShortName(original_turl->short_name()); |
176 } | 176 } |
177 prepopulated_url->id = original_turl->id(); | 177 prepopulated_url->id = original_turl->id(); |
178 prepopulated_url->sync_guid = original_turl->sync_guid(); | 178 prepopulated_url->sync_guid = original_turl->sync_guid(); |
179 prepopulated_url->date_created = original_turl->date_created(); | 179 prepopulated_url->date_created = original_turl->date_created(); |
180 prepopulated_url->last_modified = original_turl->last_modified(); | 180 prepopulated_url->last_modified = original_turl->last_modified(); |
181 } | 181 } |
182 | 182 |
183 ActionsFromPrepopulateData::ActionsFromPrepopulateData() {} | 183 ActionsFromPrepopulateData::ActionsFromPrepopulateData() {} |
184 | 184 |
| 185 ActionsFromPrepopulateData::ActionsFromPrepopulateData( |
| 186 const ActionsFromPrepopulateData& other) = default; |
| 187 |
185 ActionsFromPrepopulateData::~ActionsFromPrepopulateData() {} | 188 ActionsFromPrepopulateData::~ActionsFromPrepopulateData() {} |
186 | 189 |
187 // This is invoked when the version of the prepopulate data changes. | 190 // This is invoked when the version of the prepopulate data changes. |
188 // If |removed_keyword_guids| is not NULL, the Sync GUID of each item removed | 191 // If |removed_keyword_guids| is not NULL, the Sync GUID of each item removed |
189 // from the DB will be added to it. Note that this function will take | 192 // from the DB will be added to it. Note that this function will take |
190 // ownership of |prepopulated_urls| and will clear the vector. | 193 // ownership of |prepopulated_urls| and will clear the vector. |
191 void MergeEnginesFromPrepopulateData( | 194 void MergeEnginesFromPrepopulateData( |
192 KeywordWebDataService* service, | 195 KeywordWebDataService* service, |
193 ScopedVector<TemplateURLData>* prepopulated_urls, | 196 ScopedVector<TemplateURLData>* prepopulated_urls, |
194 size_t default_search_index, | 197 size_t default_search_index, |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 std::vector<std::string> deduped_encodings; | 386 std::vector<std::string> deduped_encodings; |
384 std::set<std::string> encoding_set; | 387 std::set<std::string> encoding_set; |
385 for (std::vector<std::string>::const_iterator i(encodings->begin()); | 388 for (std::vector<std::string>::const_iterator i(encodings->begin()); |
386 i != encodings->end(); ++i) { | 389 i != encodings->end(); ++i) { |
387 if (encoding_set.insert(*i).second) | 390 if (encoding_set.insert(*i).second) |
388 deduped_encodings.push_back(*i); | 391 deduped_encodings.push_back(*i); |
389 } | 392 } |
390 encodings->swap(deduped_encodings); | 393 encodings->swap(deduped_encodings); |
391 return encodings->size() != deduped_encodings.size(); | 394 return encodings->size() != deduped_encodings.size(); |
392 } | 395 } |
OLD | NEW |