// Copyright (c) 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_CONTAINERS_IMPL_H_ #define NET_QUIC_PLATFORM_IMPL_QUIC_CONTAINERS_IMPL_H_ #include #include #include "base/containers/circular_deque.h" #include "base/containers/queue.h" #include "base/containers/small_map.h" #include "net/base/interval_set.h" #include "net/base/linked_hash_map.h" namespace net { // TODO(mpw): s/std::unordered_map/gtl::node_hash_map/ once node_hash_map is // PG3-compatible. template ::hasher, typename Eq = typename std::unordered_map::key_equal, typename Alloc = typename std::unordered_map::allocator_type> using QuicUnorderedMapImpl = std::unordered_map; // TODO(mpw): s/std::unordered_set/gtl::node_hash_set/ once node_hash_set is // PG3-compatible. template ::hasher, typename Eq = typename std::unordered_set::key_equal, typename Alloc = typename std::unordered_set::allocator_type> using QuicUnorderedSetImpl = std::unordered_set; // A map which offers insertion-ordered iteration. template using QuicLinkedHashMapImpl = linked_hash_map; // A map which is faster than (for example) hash_map for a certain number of // unique key-value-pair elements, and upgrades itself to unordered_map when // runs out of space. template using QuicSmallMapImpl = base::small_map, Size>; // A data structure used to represent a sorted set of non-empty, non-adjacent, // and mutually disjoint intervals. template using QuicIntervalSetImpl = IntervalSet; // Represents a simple queue which may be backed by a list or // a flat circular buffer. // // DOES NOT GUARANTEE POINTER STABILITY! template using QuicQueueImpl = base::queue; // Represents a double-ended queue which may be backed by a list or // a flat circular buffer. // // DOES NOT GUARANTEE POINTER OR ITERATOR STABILITY! template using QuicDequeImpl = base::circular_deque; } // namespace net #endif // NET_QUIC_PLATFORM_IMPL_QUIC_CONTAINERS_IMPL_H_