Use absl::flat_hash_map instead of QuicSmallMap and SpdySmallMap, and remove QuicSmallMap and SpdySmallMap.

PiperOrigin-RevId: 371112499
Change-Id: I0a57cbe021b2e9ea6aaed2dec2be9c4346698b0e
diff --git a/http2/core/http2_priority_write_scheduler.h b/http2/core/http2_priority_write_scheduler.h
index efc4d7f..b7046e7 100644
--- a/http2/core/http2_priority_write_scheduler.h
+++ b/http2/core/http2_priority_write_scheduler.h
@@ -17,13 +17,13 @@
 #include <utility>
 #include <vector>
 
+#include "absl/container/flat_hash_map.h"
 #include "absl/strings/str_cat.h"
 #include "http2/core/write_scheduler.h"
 #include "common/platform/api/quiche_bug_tracker.h"
 #include "common/platform/api/quiche_logging.h"
 #include "spdy/core/spdy_intrusive_list.h"
 #include "spdy/core/spdy_protocol.h"
-#include "spdy/platform/api/spdy_containers.h"
 #include "spdy/platform/api/spdy_string_utils.h"
 
 namespace http2 {
@@ -178,7 +178,7 @@
   // Pointee owned by all_stream_infos_.
   StreamInfo* root_stream_info_;
   // Maps from stream IDs to StreamInfo objects.
-  spdy::SpdySmallMap<StreamIdType, std::unique_ptr<StreamInfo>, 10>
+  absl::flat_hash_map<StreamIdType, std::unique_ptr<StreamInfo>>
       all_stream_infos_;
   // Queue containing all ready streams, ordered with streams of higher
   // priority before streams of lower priority, and, among streams of equal
diff --git a/quic/core/quic_control_frame_manager.h b/quic/core/quic_control_frame_manager.h
index 4f20666..48d228b 100644
--- a/quic/core/quic_control_frame_manager.h
+++ b/quic/core/quic_control_frame_manager.h
@@ -8,6 +8,7 @@
 #include <cstdint>
 #include <string>
 
+#include "absl/container/flat_hash_map.h"
 #include "quic/core/frames/quic_frame.h"
 #include "quic/core/quic_connection_id.h"
 #include "quic/core/quic_types.h"
@@ -182,7 +183,7 @@
   DelegateInterface* delegate_;
 
   // Last sent window update frame for each stream.
-  QuicSmallMap<QuicStreamId, QuicControlFrameId, 10> window_update_frames_;
+  absl::flat_hash_map<QuicStreamId, QuicControlFrameId> window_update_frames_;
 };
 
 }  // namespace quic
diff --git a/quic/platform/api/quic_containers.h b/quic/platform/api/quic_containers.h
index fa4610b..4eb603f 100644
--- a/quic/platform/api/quic_containers.h
+++ b/quic/platform/api/quic_containers.h
@@ -33,14 +33,6 @@
 template <typename Key, typename Value, typename Hash = QuicDefaultHasher<Key>>
 using QuicLinkedHashMap = QuicLinkedHashMapImpl<Key, Value, Hash>;
 
-// Used for maps that are typically small, then it is faster than (for example)
-// hash_map which is optimized for large data sets. QuicSmallMap upgrades itself
-// automatically to a QuicSmallMapImpl-specified map when it runs out of space.
-//
-// DOES NOT GUARANTEE POINTER OR ITERATOR STABILITY!
-template <typename Key, typename Value, int Size>
-using QuicSmallMap = QuicSmallMapImpl<Key, Value, Size>;
-
 // Represents a simple queue which may be backed by a list or
 // a flat circular buffer.
 //
diff --git a/spdy/platform/api/spdy_containers.h b/spdy/platform/api/spdy_containers.h
index 9e3813f..2adf3f4 100644
--- a/spdy/platform/api/spdy_containers.h
+++ b/spdy/platform/api/spdy_containers.h
@@ -13,12 +13,6 @@
 template <typename Key, typename Value, typename Hash, typename Eq>
 using SpdyLinkedHashMap = SpdyLinkedHashMapImpl<Key, Value, Hash, Eq>;
 
-// Used for maps that are typically small, then it is faster than (for example)
-// hash_map which is optimized for large data sets. SpdySmallMap upgrades itself
-// automatically to a SpdySmallMapImpl-specified map when it runs out of space.
-template <typename Key, typename Value, int Size>
-using SpdySmallMap = SpdySmallMapImpl<Key, Value, Size>;
-
 }  // namespace spdy
 
 #endif  // QUICHE_SPDY_PLATFORM_API_SPDY_CONTAINERS_H_