Refactor StringPiece hash. Rename struct BASE_HASH_NAMESPACE::hash<base::StringPiece> to struct base::StringPieceHash, and modify existing code as necessary. This is motivated by https://crrev.com/1660273002/#msg6. * Remove #include "base/containers/hash_tables.h" where not used any more. * Add this include for hash_map where necessary (string_piece.h does not include it any longer, so this might be necessary for the code to compile). * Change net::linked_hash_map from base::hash_map to std::unordered_map and add Hash template parameter. This way BASE_HASH_NAMESPACE::hash<Key> will not be implicitly used any more, so move QuicBlockedWriterInterfacePtrHash out of that namespace. BUG=576864 Review URL: https://codereview.chromium.org/1666843002 Cr-Original-Commit-Position: refs/heads/master@{#374005} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 63c013002ffbbb4c7eac172097e16ea907403e08
diff --git a/tools/gn/scope.h b/tools/gn/scope.h index 2554366..96b3939 100644 --- a/tools/gn/scope.h +++ b/tools/gn/scope.h
@@ -40,7 +40,8 @@ // variables. So you should use a non-const containing scope whenever possible. class Scope { public: - typedef base::hash_map<base::StringPiece, Value> KeyValueMap; + typedef base::hash_map<base::StringPiece, Value, base::StringPieceHash> + KeyValueMap; // Holds an owning list of Items. typedef ScopedVector<Item> ItemVector; @@ -329,7 +330,8 @@ // for more. unsigned mode_flags_; - typedef base::hash_map<base::StringPiece, Record> RecordMap; + typedef base::hash_map<base::StringPiece, Record, base::StringPieceHash> + RecordMap; RecordMap values_; // Owning pointers. Note that this can't use string pieces since the names