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

Unified Diff: net/base/linked_hash_map.h

Issue 1666843002: Refactor StringPiece hash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sort includes. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/midi/midi_manager_alsa.h ('k') | net/dns/dns_hosts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/linked_hash_map.h
diff --git a/net/base/linked_hash_map.h b/net/base/linked_hash_map.h
index b86654bdeeb644d4f46b353499c1b2bf894a0cc1..e3d12d63413727e160487fad23827c7684b6aa99 100644
--- a/net/base/linked_hash_map.h
+++ b/net/base/linked_hash_map.h
@@ -18,9 +18,9 @@
#include <stddef.h>
#include <list>
+#include <unordered_map>
#include <utility>
-#include "base/containers/hash_tables.h"
#include "base/logging.h"
#include "base/macros.h"
@@ -30,11 +30,11 @@
//
// We also keep a map<Key, list::iterator> for find. Since std::list is a
// doubly-linked list, the iterators should remain stable.
-template<class Key, class Value>
+template <class Key, class Value, class Hash = std::hash<Key>>
class linked_hash_map {
private:
typedef std::list<std::pair<Key, Value> > ListType;
- typedef base::hash_map<Key, typename ListType::iterator> MapType;
+ typedef std::unordered_map<Key, typename ListType::iterator, Hash> MapType;
public:
typedef typename ListType::iterator iterator;
« no previous file with comments | « media/midi/midi_manager_alsa.h ('k') | net/dns/dns_hosts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698