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

Unified Diff: net/disk_cache/simple/simple_index_file.cc

Issue 1502373009: Allow std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, more HashPair -> HashInts Created 4 years, 11 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 | « net/base/port_util.cc ('k') | net/server/web_socket_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_index_file.cc
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index 7e80c02fa223687df2c8e32ed54c5bf5d251fd6f..025ffe986244d9374091747ab4fec737e5de2e1e 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -423,10 +423,7 @@ void SimpleIndexFile::Deserialize(const char* data, int data_len,
return;
}
-#if !defined(OS_WIN)
- // TODO(gavinp): Consider using std::unordered_map.
- entries->resize(index_metadata.GetNumberOfEntries() + kExtraSizeForMerge);
-#endif
+ entries->reserve(index_metadata.GetNumberOfEntries() + kExtraSizeForMerge);
while (entries->size() < index_metadata.GetNumberOfEntries()) {
uint64_t hash_key;
EntryMetadata entry_metadata;
« no previous file with comments | « net/base/port_util.cc ('k') | net/server/web_socket_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698