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

Unified Diff: components/omnibox/browser/in_memory_url_index_unittest.cc

Issue 2690303012: Cleaning up url_index_private_data and in_memory_url_index_types. (Closed)
Patch Set: Dropping noexcept from move operations. 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_unittest.cc
diff --git a/components/omnibox/browser/in_memory_url_index_unittest.cc b/components/omnibox/browser/in_memory_url_index_unittest.cc
index 57751d876e357a104c8d836b3aeeccc2ace1845f..dfa569271008a0eed91a6557b4edbb8a89a85277 100644
--- a/components/omnibox/browser/in_memory_url_index_unittest.cc
+++ b/components/omnibox/browser/in_memory_url_index_unittest.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include <fstream>
+#include <numeric>
#include "base/auto_reset.h"
#include "base/files/file_path.h"
@@ -738,15 +739,13 @@ TEST_F(InMemoryURLIndexTest, TrimHistoryIds) {
};
auto GetHistoryIdsUpTo = [&](HistoryID max) {
- HistoryIDSet res;
- // All ids are inserted in the end so the implicit hint would work.
- for (HistoryID id = kMinRowId; id < max; ++id)
- res.insert(id);
+ HistoryIDVector res(max - kMinRowId);
+ std::iota(res.begin(), res.end(), kMinRowId);
return res;
};
auto CountGroupElementsInIds = [](const ItemGroup& group,
- const HistoryIDSet& ids) {
+ const HistoryIDVector& ids) {
return std::count_if(ids.begin(), ids.end(), [&](history::URLID id) {
return group.min_id <= id && id < group.max_id;
});
« no previous file with comments | « components/omnibox/browser/in_memory_url_index_types.cc ('k') | components/omnibox/browser/scored_history_match.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698