gfe-relnote: Change all QuicDeque to QuicCircularDeque. No behavior change because QuicDeque is a typedef of QuicCircularDeque.

Merge note: Please remove QuicDequeImpl from quic_containers_impl.h.

PiperOrigin-RevId: 294208643
Change-Id: Iccd507392fc175872ca81eecc11565c3209161aa
diff --git a/quic/core/http/quic_header_list.h b/quic/core/http/quic_header_list.h
index fe62f51..566b766 100644
--- a/quic/core/http/quic_header_list.h
+++ b/quic/core/http/quic_header_list.h
@@ -23,7 +23,7 @@
 class QUIC_EXPORT_PRIVATE QuicHeaderList
     : public spdy::SpdyHeadersHandlerInterface {
  public:
-  using ListType = QuicDeque<std::pair<std::string, std::string>>;
+  using ListType = QuicCircularDeque<std::pair<std::string, std::string>>;
   using value_type = ListType::value_type;
   using const_iterator = ListType::const_iterator;
 
@@ -64,7 +64,7 @@
   std::string DebugString() const;
 
  private:
-  QuicDeque<std::pair<std::string, std::string>> header_list_;
+  QuicCircularDeque<std::pair<std::string, std::string>> header_list_;
 
   // The limit on the size of the header list (defined by spec as name + value +
   // overhead for each header field). Headers over this limit will not be
diff --git a/quic/core/http/quic_headers_stream.h b/quic/core/http/quic_headers_stream.h
index d07c85f..c54ce95 100644
--- a/quic/core/http/quic_headers_stream.h
+++ b/quic/core/http/quic_headers_stream.h
@@ -88,7 +88,7 @@
   QuicSpdySession* spdy_session_;
 
   // Headers that have not been fully acked.
-  QuicDeque<CompressedHeaderInfo> unacked_headers_;
+  QuicCircularDeque<CompressedHeaderInfo> unacked_headers_;
 };
 
 }  // namespace quic
diff --git a/quic/core/http/quic_spdy_stream_body_manager.h b/quic/core/http/quic_spdy_stream_body_manager.h
index ac22978..348f238 100644
--- a/quic/core/http/quic_spdy_stream_body_manager.h
+++ b/quic/core/http/quic_spdy_stream_body_manager.h
@@ -84,7 +84,7 @@
     QuicByteCount trailing_non_body_byte_count;
   };
   // Queue of body fragments and trailing non-body byte counts.
-  QuicDeque<Fragment> fragments_;
+  QuicCircularDeque<Fragment> fragments_;
   // Total body bytes received.
   QuicByteCount total_body_bytes_received_;
 };
diff --git a/quic/core/packet_number_indexed_queue.h b/quic/core/packet_number_indexed_queue.h
index 269858f..d415db7 100644
--- a/quic/core/packet_number_indexed_queue.h
+++ b/quic/core/packet_number_indexed_queue.h
@@ -113,7 +113,7 @@
     return const_cast<EntryWrapper*>(const_this->GetEntryWrapper(offset));
   }
 
-  QuicDeque<EntryWrapper> entries_;
+  QuicCircularDeque<EntryWrapper> entries_;
   // NOTE(wub): When --quic_bw_sampler_remove_packets_once_per_congestion_event
   // is enabled, |number_of_present_entries_| only represents number of holes,
   // which does not include number of acked or lost packets.
diff --git a/quic/core/qpack/qpack_blocking_manager.h b/quic/core/qpack/qpack_blocking_manager.h
index 6d2df9c..f1659a6 100644
--- a/quic/core/qpack/qpack_blocking_manager.h
+++ b/quic/core/qpack/qpack_blocking_manager.h
@@ -74,8 +74,8 @@
   // A stream typically has only one header block, except for the rare cases of
   // 1xx responses, trailers, or push promises.  Even if there are multiple
   // header blocks sent on a single stream, they might not be blocked at the
-  // same time.  Use std::list instead of QuicDeque because it has lower memory
-  // footprint when holding few elements.
+  // same time.  Use std::list instead of QuicCircularDeque because it has lower
+  // memory footprint when holding few elements.
   using HeaderBlocksForStream = std::list<IndexSet>;
   using HeaderBlocks = QuicUnorderedMap<QuicStreamId, HeaderBlocksForStream>;
 
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index 0b19905..12fa4e4 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -1276,11 +1276,13 @@
   // established, but which could not be decrypted.  We buffer these on
   // the assumption that they could not be processed because they were
   // sent with the INITIAL encryption and the CHLO message was lost.
-  QuicDeque<std::unique_ptr<QuicEncryptedPacket>> undecryptable_packets_;
+  QuicCircularDeque<std::unique_ptr<QuicEncryptedPacket>>
+      undecryptable_packets_;
 
   // Collection of coalesced packets which were received while processing
   // the current packet.
-  QuicDeque<std::unique_ptr<QuicEncryptedPacket>> received_coalesced_packets_;
+  QuicCircularDeque<std::unique_ptr<QuicEncryptedPacket>>
+      received_coalesced_packets_;
 
   // Maximum number of undecryptable packets the connection will store.
   size_t max_undecryptable_packets_;
@@ -1488,7 +1490,7 @@
   // Deque because the peer might no be using this implementation, and others
   // might send a packet with more than one PATH_CHALLENGE, so all need to be
   // saved and responded to.
-  QuicDeque<QuicPathFrameBuffer> received_path_challenge_payloads_;
+  QuicCircularDeque<QuicPathFrameBuffer> received_path_challenge_payloads_;
 
   // Set of connection IDs that should be accepted as destination on
   // received packets. This is conceptually a set but is implemented as a
diff --git a/quic/core/quic_control_frame_manager.h b/quic/core/quic_control_frame_manager.h
index ac31a1e..0d914a6 100644
--- a/quic/core/quic_control_frame_manager.h
+++ b/quic/core/quic_control_frame_manager.h
@@ -130,7 +130,7 @@
   // frame.
   void WriteOrBufferQuicFrame(QuicFrame frame);
 
-  QuicDeque<QuicFrame> control_frames_;
+  QuicCircularDeque<QuicFrame> control_frames_;
 
   // Id of latest saved control frame. 0 if no control frame has been saved.
   QuicControlFrameId last_control_frame_id_;
diff --git a/quic/core/quic_datagram_queue.h b/quic/core/quic_datagram_queue.h
index 712a56e..57f806e 100644
--- a/quic/core/quic_datagram_queue.h
+++ b/quic/core/quic_datagram_queue.h
@@ -61,7 +61,7 @@
   const QuicClock* clock_;
 
   QuicTime::Delta max_time_in_queue_ = QuicTime::Delta::Zero();
-  QuicDeque<Datagram> queue_;
+  QuicCircularDeque<Datagram> queue_;
 };
 
 }  // namespace quic
diff --git a/quic/core/quic_interval_deque.h b/quic/core/quic_interval_deque.h
index ed77d68..0ad423e 100644
--- a/quic/core/quic_interval_deque.h
+++ b/quic/core/quic_interval_deque.h
@@ -135,7 +135,7 @@
 //   //   cached_index -> 1
 //   //   container -> {{2, [25, 30)}, {3, [35, 50)}}
 
-template <class T, class C = QUIC_NO_EXPORT QuicDeque<T>>
+template <class T, class C = QUIC_NO_EXPORT QuicCircularDeque<T>>
 class QUIC_EXPORT_PRIVATE QuicIntervalDeque {
  public:
   class QUIC_EXPORT_PRIVATE Iterator {
@@ -359,7 +359,7 @@
   QuicInterval<std::size_t> interval = item.interval();
   // Adding an empty interval is a bug.
   if (interval.Empty()) {
-    QUIC_BUG << "Trying to save empty interval to QuicDeque.";
+    QUIC_BUG << "Trying to save empty interval to QuicCircularDeque.";
     return;
   }
   container_.push_back(std::forward<U>(item));
diff --git a/quic/core/quic_interval_deque_test.cc b/quic/core/quic_interval_deque_test.cc
index fbe5536..8d57d5f 100644
--- a/quic/core/quic_interval_deque_test.cc
+++ b/quic/core/quic_interval_deque_test.cc
@@ -50,7 +50,7 @@
 
 // The goal of this test is to show insertion/push_back, iteration, and and
 // deletion/pop_front from the container.
-TEST_F(QuicIntervalDequeTest, QuicDequeInsertRemoveSize) {
+TEST_F(QuicIntervalDequeTest, InsertRemoveSize) {
   QID qid;
 
   EXPECT_EQ(qid.Size(), std::size_t(0));
@@ -89,7 +89,7 @@
 // The goal of this test is to push data into the container at specific
 // intervals and show how the |DataAt| method can move the |cached_index| as the
 // iterator moves through the data.
-TEST_F(QuicIntervalDequeTest, QuicDequeInsertIterateWhole) {
+TEST_F(QuicIntervalDequeTest, InsertIterateWhole) {
   // The write index should point to the beginning of the container.
   const int32_t cached_index = QuicIntervalDequePeer::GetCachedIndex(&qid_);
   EXPECT_EQ(cached_index, 0);
@@ -118,7 +118,7 @@
 // The goal of this test is to push data into the container at specific
 // intervals and show how the |DataAt| method can move the |cached_index| using
 // the off-by-one logic.
-TEST_F(QuicIntervalDequeTest, QuicDequeOffByOne) {
+TEST_F(QuicIntervalDequeTest, OffByOne) {
   // The write index should point to the beginning of the container.
   const int32_t cached_index = QuicIntervalDequePeer::GetCachedIndex(&qid_);
   EXPECT_EQ(cached_index, 0);
@@ -145,7 +145,7 @@
 
 // The goal of this test is to push data into the container at specific
 // intervals and show modify the structure with a live iterator.
-TEST_F(QuicIntervalDequeTest, QuicDequeIteratorInvalidation) {
+TEST_F(QuicIntervalDequeTest, IteratorInvalidation) {
   // The write index should point to the beginning of the container.
   const int32_t cached_index = QuicIntervalDequePeer::GetCachedIndex(&qid_);
   EXPECT_EQ(cached_index, 0);
@@ -159,9 +159,9 @@
   EXPECT_EQ(lookup_end, qid_.DataEnd());
 }
 
-// The goal of this test is the same as |QuicDequeInsertIterateWhole| but to
+// The goal of this test is the same as |InsertIterateWhole| but to
 // skip certain intervals and show the |cached_index| is updated properly.
-TEST_F(QuicIntervalDequeTest, QuicDequeInsertIterateSkip) {
+TEST_F(QuicIntervalDequeTest, InsertIterateSkip) {
   // The write index should point to the beginning of the container.
   const int32_t cached_index = QuicIntervalDequePeer::GetCachedIndex(&qid_);
   EXPECT_EQ(cached_index, 0);
@@ -189,9 +189,9 @@
   }
 }
 
-// The goal of this test is the same as |QuicDequeInsertIterateWhole| but it has
+// The goal of this test is the same as |InsertIterateWhole| but it has
 // |PopFront| calls interleaved to show the |cached_index| updates correctly.
-TEST_F(QuicIntervalDequeTest, QuicDequeInsertDeleteIterate) {
+TEST_F(QuicIntervalDequeTest, InsertDeleteIterate) {
   // The write index should point to the beginning of the container.
   const int32_t index = QuicIntervalDequePeer::GetCachedIndex(&qid_);
   EXPECT_EQ(index, 0);
@@ -223,7 +223,7 @@
 
 // The goal of this test is to move the index to the end and then add more data
 // to show it can be reset to a valid index.
-TEST_F(QuicIntervalDequeTest, QuicDequeInsertIterateInsert) {
+TEST_F(QuicIntervalDequeTest, InsertIterateInsert) {
   // The write index should point to the beginning of the container.
   const int32_t index = QuicIntervalDequePeer::GetCachedIndex(&qid_);
   EXPECT_EQ(index, 0);
@@ -285,7 +285,7 @@
 
 // The goal of this test is to push data into the container at specific
 // intervals and show how the |DataAt| can iterate over already scanned data.
-TEST_F(QuicIntervalDequeTest, QuicDequeRescanData) {
+TEST_F(QuicIntervalDequeTest, RescanData) {
   // The write index should point to the beginning of the container.
   const int32_t index = QuicIntervalDequePeer::GetCachedIndex(&qid_);
   EXPECT_EQ(index, 0);
@@ -336,22 +336,22 @@
 
 // The goal of this test is to show that popping from an empty container is a
 // bug.
-TEST_F(QuicIntervalDequeTest, QuicDequePopEmpty) {
+TEST_F(QuicIntervalDequeTest, PopEmpty) {
   QID qid;
   EXPECT_TRUE(qid.Empty());
   EXPECT_QUIC_BUG(qid.PopFront(), "Trying to pop from an empty container.");
 }
 
 // The goal of this test is to show that adding a zero-sized interval is a bug.
-TEST_F(QuicIntervalDequeTest, QuicDequeZeroSizedInterval) {
+TEST_F(QuicIntervalDequeTest, ZeroSizedInterval) {
   QID qid;
   EXPECT_QUIC_BUG(qid.PushBack(TestIntervalItem(0, 0, 0)),
-                  "Trying to save empty interval to QuicDeque.");
+                  "Trying to save empty interval to .");
 }
 
 // The goal of this test is to show that an iterator to an empty container
 // returns |DataEnd|.
-TEST_F(QuicIntervalDequeTest, QuicDequeIteratorEmpty) {
+TEST_F(QuicIntervalDequeTest, IteratorEmpty) {
   QID qid;
   auto it = qid.DataAt(0);
   EXPECT_EQ(it, qid.DataEnd());
diff --git a/quic/core/quic_packet_creator.cc b/quic/core/quic_packet_creator.cc
index b4297bc..30df1a3 100644
--- a/quic/core/quic_packet_creator.cc
+++ b/quic/core/quic_packet_creator.cc
@@ -806,7 +806,7 @@
 
 OwningSerializedPacketPointer
 QuicPacketCreator::SerializePathResponseConnectivityProbingPacket(
-    const QuicDeque<QuicPathFrameBuffer>& payloads,
+    const QuicCircularDeque<QuicPathFrameBuffer>& payloads,
     const bool is_padded) {
   QUIC_BUG_IF(!VersionHasIetfQuicFrames(framer_->transport_version()))
       << "Must be version 99 to serialize path response connectivity probe, is "
@@ -872,7 +872,7 @@
     const QuicPacketHeader& header,
     char* buffer,
     size_t packet_length,
-    const QuicDeque<QuicPathFrameBuffer>& payloads,
+    const QuicCircularDeque<QuicPathFrameBuffer>& payloads,
     const bool is_padded,
     EncryptionLevel level) {
   if (payloads.empty()) {
diff --git a/quic/core/quic_packet_creator.h b/quic/core/quic_packet_creator.h
index 96cd5bf..15e558c 100644
--- a/quic/core/quic_packet_creator.h
+++ b/quic/core/quic_packet_creator.h
@@ -222,7 +222,7 @@
   // will pad the packet to be MTU bytes long, else it will not pad the packet.
   // |payloads| is cleared.
   OwningSerializedPacketPointer SerializePathResponseConnectivityProbingPacket(
-      const QuicDeque<QuicPathFrameBuffer>& payloads,
+      const QuicCircularDeque<QuicPathFrameBuffer>& payloads,
       const bool is_padded);
 
   // Returns a dummy packet that is valid but contains no useful information.
@@ -404,12 +404,13 @@
   // frame. Also fills the packet with padding if |is_padded| is
   // true. |payloads| is always emptied, even if the packet can not be
   // successfully built.
-  size_t BuildPathResponsePacket(const QuicPacketHeader& header,
-                                 char* buffer,
-                                 size_t packet_length,
-                                 const QuicDeque<QuicPathFrameBuffer>& payloads,
-                                 const bool is_padded,
-                                 EncryptionLevel level);
+  size_t BuildPathResponsePacket(
+      const QuicPacketHeader& header,
+      char* buffer,
+      size_t packet_length,
+      const QuicCircularDeque<QuicPathFrameBuffer>& payloads,
+      const bool is_padded,
+      EncryptionLevel level);
 
   // Serializes a probing packet, which is a padded PING packet. Returns the
   // length of the packet. Returns 0 if it fails to serialize.
diff --git a/quic/core/quic_packet_creator_test.cc b/quic/core/quic_packet_creator_test.cc
index 0f3a778..1507ae5 100644
--- a/quic/core/quic_packet_creator_test.cc
+++ b/quic/core/quic_packet_creator_test.cc
@@ -775,7 +775,7 @@
   };
   // clang-format on
   std::unique_ptr<char[]> buffer(new char[kMaxOutgoingPacketSize]);
-  QuicDeque<QuicPathFrameBuffer> payloads;
+  QuicCircularDeque<QuicPathFrameBuffer> payloads;
   payloads.push_back(payload0);
   size_t length = creator_.BuildPathResponsePacket(
       header, buffer.get(), QUICHE_ARRAYSIZE(packet), payloads,
@@ -822,7 +822,7 @@
   };
   // clang-format on
   std::unique_ptr<char[]> buffer(new char[kMaxOutgoingPacketSize]);
-  QuicDeque<QuicPathFrameBuffer> payloads;
+  QuicCircularDeque<QuicPathFrameBuffer> payloads;
   payloads.push_back(payload0);
   size_t length = creator_.BuildPathResponsePacket(
       header, buffer.get(), QUICHE_ARRAYSIZE(packet), payloads,
@@ -872,7 +872,7 @@
   // clang-format on
 
   std::unique_ptr<char[]> buffer(new char[kMaxOutgoingPacketSize]);
-  QuicDeque<QuicPathFrameBuffer> payloads;
+  QuicCircularDeque<QuicPathFrameBuffer> payloads;
   payloads.push_back(payload0);
   payloads.push_back(payload1);
   payloads.push_back(payload2);
@@ -926,7 +926,7 @@
   // clang-format on
 
   std::unique_ptr<char[]> buffer(new char[kMaxOutgoingPacketSize]);
-  QuicDeque<QuicPathFrameBuffer> payloads;
+  QuicCircularDeque<QuicPathFrameBuffer> payloads;
   payloads.push_back(payload0);
   payloads.push_back(payload1);
   payloads.push_back(payload2);
@@ -1021,7 +1021,7 @@
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
-    QuicDeque<QuicPathFrameBuffer> payloads;
+    QuicCircularDeque<QuicPathFrameBuffer> payloads;
     payloads.push_back(payload0);
 
     OwningSerializedPacketPointer encrypted(
@@ -1055,7 +1055,7 @@
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
-    QuicDeque<QuicPathFrameBuffer> payloads;
+    QuicCircularDeque<QuicPathFrameBuffer> payloads;
     payloads.push_back(payload0);
 
     OwningSerializedPacketPointer encrypted(
@@ -1089,7 +1089,7 @@
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
-    QuicDeque<QuicPathFrameBuffer> payloads;
+    QuicCircularDeque<QuicPathFrameBuffer> payloads;
     payloads.push_back(payload0);
     payloads.push_back(payload1);
 
@@ -1126,7 +1126,7 @@
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
-    QuicDeque<QuicPathFrameBuffer> payloads;
+    QuicCircularDeque<QuicPathFrameBuffer> payloads;
     payloads.push_back(payload0);
     payloads.push_back(payload1);
 
@@ -1163,7 +1163,7 @@
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
-    QuicDeque<QuicPathFrameBuffer> payloads;
+    QuicCircularDeque<QuicPathFrameBuffer> payloads;
     payloads.push_back(payload0);
     payloads.push_back(payload1);
     payloads.push_back(payload2);
@@ -1203,7 +1203,7 @@
     EncryptionLevel level = static_cast<EncryptionLevel>(i);
     creator_.set_encryption_level(level);
 
-    QuicDeque<QuicPathFrameBuffer> payloads;
+    QuicCircularDeque<QuicPathFrameBuffer> payloads;
     payloads.push_back(payload0);
     payloads.push_back(payload1);
     payloads.push_back(payload2);
diff --git a/quic/core/quic_stream_send_buffer.cc b/quic/core/quic_stream_send_buffer.cc
index 9adae74..1aa9b4b 100644
--- a/quic/core/quic_stream_send_buffer.cc
+++ b/quic/core/quic_stream_send_buffer.cc
@@ -148,7 +148,7 @@
     return data_length == 0;
   }
 
-  QuicDeque<BufferedSlice>::iterator slice_it =
+  QuicCircularDeque<BufferedSlice>::iterator slice_it =
       write_index_ == -1
           ? buffered_slices_.begin()
           // Assume with write_index, write mostly starts from indexed slice.
@@ -185,7 +185,7 @@
     data_length -= copy_length;
 
     if (write_index_ != -1) {
-      QuicDeque<BufferedSlice>::const_iterator index_slice =
+      QuicCircularDeque<BufferedSlice>::const_iterator index_slice =
           buffered_slices_.begin() + write_index_;
       if (index_slice->offset == slice_it->offset &&
           copy_length == available_bytes_in_slice) {
diff --git a/quic/core/quic_stream_send_buffer.h b/quic/core/quic_stream_send_buffer.h
index 57be51d..679bf92 100644
--- a/quic/core/quic_stream_send_buffer.h
+++ b/quic/core/quic_stream_send_buffer.h
@@ -146,7 +146,7 @@
   void CleanUpBufferedSlices();
 
   bool interval_deque_active_;
-  QuicDeque<BufferedSlice> buffered_slices_;
+  QuicCircularDeque<BufferedSlice> buffered_slices_;
   // |current_end_offset_| stores the end offset of the current slice to ensure
   // data isn't being written out of order when using the |interval_deque_|.
   QuicStreamOffset current_end_offset_;
diff --git a/quic/core/quic_time_wait_list_manager.h b/quic/core/quic_time_wait_list_manager.h
index 5c75535..c9a5261 100644
--- a/quic/core/quic_time_wait_list_manager.h
+++ b/quic/core/quic_time_wait_list_manager.h
@@ -193,8 +193,8 @@
   virtual bool SendOrQueuePacket(std::unique_ptr<QueuedPacket> packet,
                                  const QuicPerPacketContext* packet_context);
 
-  const QuicDeque<std::unique_ptr<QueuedPacket>>& pending_packets_queue()
-      const {
+  const QuicCircularDeque<std::unique_ptr<QueuedPacket>>&
+  pending_packets_queue() const {
     return pending_packets_queue_;
   }
 
@@ -260,7 +260,7 @@
 
   // Pending termination packets that need to be sent out to the peer when we
   // are given a chance to write by the dispatcher.
-  QuicDeque<std::unique_ptr<QueuedPacket>> pending_packets_queue_;
+  QuicCircularDeque<std::unique_ptr<QueuedPacket>> pending_packets_queue_;
 
   // Time period for which connection_ids should remain in time wait state.
   const QuicTime::Delta time_wait_period_;
diff --git a/quic/core/quic_unacked_packet_map.h b/quic/core/quic_unacked_packet_map.h
index 1cad5eb..d155fcc 100644
--- a/quic/core/quic_unacked_packet_map.h
+++ b/quic/core/quic_unacked_packet_map.h
@@ -109,7 +109,7 @@
   // been acked by the peer.  If there are no unacked packets, returns 0.
   QuicPacketNumber GetLeastUnacked() const;
 
-  // This can not be a QuicDeque since pointers into this are
+  // This can not be a QuicCircularDeque since pointers into this are
   // assumed to be stable.
   typedef std::deque<QuicTransmissionInfo> UnackedPacketMap;