diff --git a/quiche/quic/core/chlo_extractor.cc b/quiche/quic/core/chlo_extractor.cc
index 7cd6ec9..c3dc584 100644
--- a/quiche/quic/core/chlo_extractor.cc
+++ b/quiche/quic/core/chlo_extractor.cc
@@ -111,8 +111,7 @@
 };
 
 ChloFramerVisitor::ChloFramerVisitor(
-    QuicFramer* framer,
-    const QuicTagVector& create_session_tag_indicators,
+    QuicFramer* framer, const QuicTagVector& create_session_tag_indicators,
     ChloExtractor::Delegate* delegate)
     : framer_(framer),
       create_session_tag_indicators_(create_session_tag_indicators),
@@ -151,8 +150,7 @@
     const QuicEncryptedPacket& /*packet*/) {}
 
 void ChloFramerVisitor::OnUndecryptablePacket(
-    const QuicEncryptedPacket& /*packet*/,
-    EncryptionLevel /*decryption_level*/,
+    const QuicEncryptedPacket& /*packet*/, EncryptionLevel /*decryption_level*/,
     bool /*has_decryption_key*/) {}
 
 bool ChloFramerVisitor::OnStreamFrame(const QuicStreamFrame& frame) {
@@ -348,8 +346,7 @@
 bool ChloExtractor::Extract(const QuicEncryptedPacket& packet,
                             ParsedQuicVersion version,
                             const QuicTagVector& create_session_tag_indicators,
-                            Delegate* delegate,
-                            uint8_t connection_id_length) {
+                            Delegate* delegate, uint8_t connection_id_length) {
   QUIC_DVLOG(1) << "Extracting CHLO using version " << version;
   QuicFramer framer({version}, QuicTime::Zero(), Perspective::IS_SERVER,
                     connection_id_length);
diff --git a/quiche/quic/core/chlo_extractor.h b/quiche/quic/core/chlo_extractor.h
index c2604c8..48a45f0 100644
--- a/quiche/quic/core/chlo_extractor.h
+++ b/quiche/quic/core/chlo_extractor.h
@@ -33,8 +33,7 @@
   static bool Extract(const QuicEncryptedPacket& packet,
                       ParsedQuicVersion version,
                       const QuicTagVector& create_session_tag_indicators,
-                      Delegate* delegate,
-                      uint8_t connection_id_length);
+                      Delegate* delegate, uint8_t connection_id_length);
 
   ChloExtractor(const ChloExtractor&) = delete;
   ChloExtractor operator=(const ChloExtractor&) = delete;
diff --git a/quiche/quic/core/chlo_extractor_test.cc b/quiche/quic/core/chlo_extractor_test.cc
index c8268f8..3852469 100644
--- a/quiche/quic/core/chlo_extractor_test.cc
+++ b/quiche/quic/core/chlo_extractor_test.cc
@@ -27,8 +27,7 @@
   ~TestDelegate() override = default;
 
   // ChloExtractor::Delegate implementation
-  void OnChlo(QuicTransportVersion version,
-              QuicConnectionId connection_id,
+  void OnChlo(QuicTransportVersion version, QuicConnectionId connection_id,
               const CryptoHandshakeMessage& chlo) override {
     version_ = version;
     connection_id_ = connection_id;
@@ -55,8 +54,7 @@
  public:
   ChloExtractorTest() : version_(GetParam()) {}
 
-  void MakePacket(absl::string_view data,
-                  bool munge_offset,
+  void MakePacket(absl::string_view data, bool munge_offset,
                   bool munge_stream_id) {
     QuicPacketHeader header;
     header.destination_connection_id = TestConnectionId();
@@ -110,8 +108,7 @@
 };
 
 INSTANTIATE_TEST_SUITE_P(
-    ChloExtractorTests,
-    ChloExtractorTest,
+    ChloExtractorTests, ChloExtractorTest,
     ::testing::ValuesIn(AllSupportedVersionsWithQuicCrypto()),
     ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/legacy_quic_stream_id_manager.cc b/quiche/quic/core/legacy_quic_stream_id_manager.cc
index 1afefaa..0e422ef 100644
--- a/quiche/quic/core/legacy_quic_stream_id_manager.cc
+++ b/quiche/quic/core/legacy_quic_stream_id_manager.cc
@@ -11,17 +11,14 @@
 namespace quic {
 
 LegacyQuicStreamIdManager::LegacyQuicStreamIdManager(
-    Perspective perspective,
-    QuicTransportVersion transport_version,
-    size_t max_open_outgoing_streams,
-    size_t max_open_incoming_streams)
+    Perspective perspective, QuicTransportVersion transport_version,
+    size_t max_open_outgoing_streams, size_t max_open_incoming_streams)
     : perspective_(perspective),
       transport_version_(transport_version),
       max_open_outgoing_streams_(max_open_outgoing_streams),
       max_open_incoming_streams_(max_open_incoming_streams),
-      next_outgoing_stream_id_(
-          QuicUtils::GetFirstBidirectionalStreamId(transport_version_,
-                                                   perspective_)),
+      next_outgoing_stream_id_(QuicUtils::GetFirstBidirectionalStreamId(
+          transport_version_, perspective_)),
       largest_peer_created_stream_id_(
           perspective_ == Perspective::IS_SERVER
               ? (QuicVersionUsesCryptoFrames(transport_version_)
diff --git a/quiche/quic/core/legacy_quic_stream_id_manager_test.cc b/quiche/quic/core/legacy_quic_stream_id_manager_test.cc
index 5ab742c..1dcc057 100644
--- a/quiche/quic/core/legacy_quic_stream_id_manager_test.cc
+++ b/quiche/quic/core/legacy_quic_stream_id_manager_test.cc
@@ -53,8 +53,7 @@
 class LegacyQuicStreamIdManagerTest : public QuicTestWithParam<TestParams> {
  public:
   LegacyQuicStreamIdManagerTest()
-      : manager_(GetParam().perspective,
-                 GetParam().version.transport_version,
+      : manager_(GetParam().perspective, GetParam().version.transport_version,
                  kDefaultMaxStreamsPerConnection,
                  kDefaultMaxStreamsPerConnection) {}
 
@@ -72,8 +71,7 @@
   LegacyQuicStreamIdManager manager_;
 };
 
-INSTANTIATE_TEST_SUITE_P(Tests,
-                         LegacyQuicStreamIdManagerTest,
+INSTANTIATE_TEST_SUITE_P(Tests, LegacyQuicStreamIdManagerTest,
                          ::testing::ValuesIn(GetTestParams()),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/quic_alarm.cc b/quiche/quic/core/quic_alarm.cc
index f53b987..029eefd 100644
--- a/quiche/quic/core/quic_alarm.cc
+++ b/quiche/quic/core/quic_alarm.cc
@@ -75,9 +75,7 @@
   }
 }
 
-bool QuicAlarm::IsSet() const {
-  return deadline_.IsInitialized();
-}
+bool QuicAlarm::IsSet() const { return deadline_.IsInitialized(); }
 
 void QuicAlarm::Fire() {
   if (!IsSet()) {
diff --git a/quiche/quic/core/quic_alarm_test.cc b/quiche/quic/core/quic_alarm_test.cc
index d9980eb..5feef78 100644
--- a/quiche/quic/core/quic_alarm_test.cc
+++ b/quiche/quic/core/quic_alarm_test.cc
@@ -111,9 +111,7 @@
   QuicTime new_deadline_;
 };
 
-TEST_F(QuicAlarmTest, IsSet) {
-  EXPECT_FALSE(alarm_.IsSet());
-}
+TEST_F(QuicAlarmTest, IsSet) { EXPECT_FALSE(alarm_.IsSet()); }
 
 TEST_F(QuicAlarmTest, Set) {
   QuicTime deadline = QuicTime::Zero() + QuicTime::Delta::FromSeconds(7);
diff --git a/quiche/quic/core/quic_buffered_packet_store.cc b/quiche/quic/core/quic_buffered_packet_store.cc
index f9c6cf6..d5aa841 100644
--- a/quiche/quic/core/quic_buffered_packet_store.cc
+++ b/quiche/quic/core/quic_buffered_packet_store.cc
@@ -66,8 +66,7 @@
 BufferedPacketList::~BufferedPacketList() {}
 
 QuicBufferedPacketStore::QuicBufferedPacketStore(
-    VisitorInterface* visitor,
-    const QuicClock* clock,
+    VisitorInterface* visitor, const QuicClock* clock,
     QuicAlarmFactory* alarm_factory)
     : connection_life_span_(
           QuicTime::Delta::FromSeconds(kInitialIdleTimeoutSecs)),
diff --git a/quiche/quic/core/quic_buffered_packet_store.h b/quiche/quic/core/quic_buffered_packet_store.h
index 34fd1ab..f3310b4 100644
--- a/quiche/quic/core/quic_buffered_packet_store.h
+++ b/quiche/quic/core/quic_buffered_packet_store.h
@@ -77,9 +77,9 @@
     TlsChloExtractor tls_chlo_extractor;
   };
 
-  using BufferedPacketMap = quiche::QuicheLinkedHashMap<QuicConnectionId,
-                                                        BufferedPacketList,
-                                                        QuicConnectionIdHash>;
+  using BufferedPacketMap =
+      quiche::QuicheLinkedHashMap<QuicConnectionId, BufferedPacketList,
+                                  QuicConnectionIdHash>;
 
   class QUIC_NO_EXPORT VisitorInterface {
    public:
diff --git a/quiche/quic/core/quic_chaos_protector.cc b/quiche/quic/core/quic_chaos_protector.cc
index dd25b9e..8daaeb7 100644
--- a/quiche/quic/core/quic_chaos_protector.cc
+++ b/quiche/quic/core/quic_chaos_protector.cc
@@ -29,8 +29,7 @@
 
 QuicChaosProtector::QuicChaosProtector(const QuicCryptoFrame& crypto_frame,
                                        int num_padding_bytes,
-                                       size_t packet_size,
-                                       QuicFramer* framer,
+                                       size_t packet_size, QuicFramer* framer,
                                        QuicRandom* random)
     : packet_size_(packet_size),
       crypto_data_length_(crypto_frame.data_length),
@@ -44,13 +43,10 @@
   QUICHE_DCHECK_NE(random_, nullptr);
 }
 
-QuicChaosProtector::~QuicChaosProtector() {
-  DeleteFrames(&frames_);
-}
+QuicChaosProtector::~QuicChaosProtector() { DeleteFrames(&frames_); }
 
 absl::optional<size_t> QuicChaosProtector::BuildDataPacket(
-    const QuicPacketHeader& header,
-    char* buffer) {
+    const QuicPacketHeader& header, char* buffer) {
   if (!CopyCryptoDataToLocalBuffer()) {
     return absl::nullopt;
   }
@@ -62,9 +58,7 @@
 }
 
 WriteStreamDataResult QuicChaosProtector::WriteStreamData(
-    QuicStreamId id,
-    QuicStreamOffset offset,
-    QuicByteCount data_length,
+    QuicStreamId id, QuicStreamOffset offset, QuicByteCount data_length,
     QuicDataWriter* /*writer*/) {
   QUIC_BUG(chaos stream) << "This should never be called; id " << id
                          << " offset " << offset << " data_length "
@@ -213,8 +207,7 @@
 }
 
 absl::optional<size_t> QuicChaosProtector::BuildPacket(
-    const QuicPacketHeader& header,
-    char* buffer) {
+    const QuicPacketHeader& header, char* buffer) {
   QuicStreamFrameDataProducer* original_data_producer =
       framer_->data_producer();
   framer_->set_data_producer(this);
diff --git a/quiche/quic/core/quic_chaos_protector.h b/quiche/quic/core/quic_chaos_protector.h
index e5fec03..6bcb335 100644
--- a/quiche/quic/core/quic_chaos_protector.h
+++ b/quiche/quic/core/quic_chaos_protector.h
@@ -31,10 +31,8 @@
  public:
   // |framer| and |random| must be valid for the lifetime of QuicChaosProtector.
   explicit QuicChaosProtector(const QuicCryptoFrame& crypto_frame,
-                              int num_padding_bytes,
-                              size_t packet_size,
-                              QuicFramer* framer,
-                              QuicRandom* random);
+                              int num_padding_bytes, size_t packet_size,
+                              QuicFramer* framer, QuicRandom* random);
 
   ~QuicChaosProtector() override;
 
@@ -53,8 +51,7 @@
                                         QuicStreamOffset offset,
                                         QuicByteCount data_length,
                                         QuicDataWriter* /*writer*/) override;
-  bool WriteCryptoData(EncryptionLevel level,
-                       QuicStreamOffset offset,
+  bool WriteCryptoData(EncryptionLevel level, QuicStreamOffset offset,
                        QuicByteCount data_length,
                        QuicDataWriter* writer) override;
 
diff --git a/quiche/quic/core/quic_chaos_protector_test.cc b/quiche/quic/core/quic_chaos_protector_test.cc
index 2ea3cd2..95c073a 100644
--- a/quiche/quic/core/quic_chaos_protector_test.cc
+++ b/quiche/quic/core/quic_chaos_protector_test.cc
@@ -60,8 +60,7 @@
   }
 
   // From QuicStreamFrameDataProducer.
-  bool WriteCryptoData(EncryptionLevel level,
-                       QuicStreamOffset offset,
+  bool WriteCryptoData(EncryptionLevel level, QuicStreamOffset offset,
                        QuicByteCount data_length,
                        QuicDataWriter* writer) override {
     EXPECT_EQ(level, level);
@@ -152,8 +151,7 @@
   return versions;
 }
 
-INSTANTIATE_TEST_SUITE_P(QuicChaosProtectorTests,
-                         QuicChaosProtectorTest,
+INSTANTIATE_TEST_SUITE_P(QuicChaosProtectorTests, QuicChaosProtectorTest,
                          ::testing::ValuesIn(TestVersions()),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/quic_coalesced_packet.cc b/quiche/quic/core/quic_coalesced_packet.cc
index 1983b2c..802fac4 100644
--- a/quiche/quic/core/quic_coalesced_packet.cc
+++ b/quiche/quic/core/quic_coalesced_packet.cc
@@ -13,9 +13,7 @@
 QuicCoalescedPacket::QuicCoalescedPacket()
     : length_(0), max_packet_length_(0) {}
 
-QuicCoalescedPacket::~QuicCoalescedPacket() {
-  Clear();
-}
+QuicCoalescedPacket::~QuicCoalescedPacket() { Clear(); }
 
 bool QuicCoalescedPacket::MaybeCoalescePacket(
     const SerializedPacket& packet, const QuicSocketAddress& self_address,
@@ -117,8 +115,7 @@
   initial_packet_ = nullptr;
 }
 
-bool QuicCoalescedPacket::CopyEncryptedBuffers(char* buffer,
-                                               size_t buffer_len,
+bool QuicCoalescedPacket::CopyEncryptedBuffers(char* buffer, size_t buffer_len,
                                                size_t* length_copied) const {
   *length_copied = 0;
   for (const auto& packet : encrypted_buffers_) {
diff --git a/quiche/quic/core/quic_coalesced_packet.h b/quiche/quic/core/quic_coalesced_packet.h
index 364d3aa..21a6e1e 100644
--- a/quiche/quic/core/quic_coalesced_packet.h
+++ b/quiche/quic/core/quic_coalesced_packet.h
@@ -37,8 +37,7 @@
   // Copies encrypted_buffers_ to |buffer| and sets |length_copied| to the
   // copied amount. Returns false if copy fails (i.e., |buffer_len| is not
   // enough).
-  bool CopyEncryptedBuffers(char* buffer,
-                            size_t buffer_len,
+  bool CopyEncryptedBuffers(char* buffer, size_t buffer_len,
                             size_t* length_copied) const;
 
   std::string ToString(size_t serialized_length) const;
diff --git a/quiche/quic/core/quic_config.cc b/quiche/quic/core/quic_config.cc
index d6f2acd..c48001a 100644
--- a/quiche/quic/core/quic_config.cc
+++ b/quiche/quic/core/quic_config.cc
@@ -30,12 +30,9 @@
 // Reads the value corresponding to |name_| from |msg| into |out|. If the
 // |name_| is absent in |msg| and |presence| is set to OPTIONAL |out| is set
 // to |default_value|.
-QuicErrorCode ReadUint32(const CryptoHandshakeMessage& msg,
-                         QuicTag tag,
-                         QuicConfigPresence presence,
-                         uint32_t default_value,
-                         uint32_t* out,
-                         std::string* error_details) {
+QuicErrorCode ReadUint32(const CryptoHandshakeMessage& msg, QuicTag tag,
+                         QuicConfigPresence presence, uint32_t default_value,
+                         uint32_t* out, std::string* error_details) {
   QUICHE_DCHECK(error_details != nullptr);
   QuicErrorCode error = msg.GetUint32(tag, out);
   switch (error) {
@@ -66,9 +63,7 @@
       has_receive_value_(false) {}
 QuicFixedUint32::~QuicFixedUint32() {}
 
-bool QuicFixedUint32::HasSendValue() const {
-  return has_send_value_;
-}
+bool QuicFixedUint32::HasSendValue() const { return has_send_value_; }
 
 uint32_t QuicFixedUint32::GetSendValue() const {
   QUIC_BUG_IF(quic_bug_12743_1, !has_send_value_)
@@ -81,9 +76,7 @@
   send_value_ = value;
 }
 
-bool QuicFixedUint32::HasReceivedValue() const {
-  return has_receive_value_;
-}
+bool QuicFixedUint32::HasReceivedValue() const { return has_receive_value_; }
 
 uint32_t QuicFixedUint32::GetReceivedValue() const {
   QUIC_BUG_IF(quic_bug_12743_2, !has_receive_value_)
@@ -108,8 +101,7 @@
 }
 
 QuicErrorCode QuicFixedUint32::ProcessPeerHello(
-    const CryptoHandshakeMessage& peer_hello,
-    HelloType /*hello_type*/,
+    const CryptoHandshakeMessage& peer_hello, HelloType /*hello_type*/,
     std::string* error_details) {
   QUICHE_DCHECK(error_details != nullptr);
   if (tag_ == 0) {
@@ -143,9 +135,7 @@
 
 QuicFixedUint62::~QuicFixedUint62() {}
 
-bool QuicFixedUint62::HasSendValue() const {
-  return has_send_value_;
-}
+bool QuicFixedUint62::HasSendValue() const { return has_send_value_; }
 
 uint64_t QuicFixedUint62::GetSendValue() const {
   if (!has_send_value_) {
@@ -165,9 +155,7 @@
   send_value_ = value;
 }
 
-bool QuicFixedUint62::HasReceivedValue() const {
-  return has_receive_value_;
-}
+bool QuicFixedUint62::HasReceivedValue() const { return has_receive_value_; }
 
 uint64_t QuicFixedUint62::GetReceivedValue() const {
   if (!has_receive_value_) {
@@ -199,8 +187,7 @@
 }
 
 QuicErrorCode QuicFixedUint62::ProcessPeerHello(
-    const CryptoHandshakeMessage& peer_hello,
-    HelloType /*hello_type*/,
+    const CryptoHandshakeMessage& peer_hello, HelloType /*hello_type*/,
     std::string* error_details) {
   QUICHE_DCHECK(error_details != nullptr);
   uint32_t receive_value32;
@@ -225,8 +212,7 @@
 }
 
 QuicFixedStatelessResetToken::QuicFixedStatelessResetToken(
-    QuicTag tag,
-    QuicConfigPresence presence)
+    QuicTag tag, QuicConfigPresence presence)
     : QuicConfigValue(tag, presence),
       has_send_value_(false),
       has_receive_value_(false) {}
@@ -273,8 +259,7 @@
 }
 
 QuicErrorCode QuicFixedStatelessResetToken::ProcessPeerHello(
-    const CryptoHandshakeMessage& peer_hello,
-    HelloType /*hello_type*/,
+    const CryptoHandshakeMessage& peer_hello, HelloType /*hello_type*/,
     std::string* error_details) {
   QUICHE_DCHECK(error_details != nullptr);
   QuicErrorCode error =
@@ -307,9 +292,7 @@
 
 QuicFixedTagVector::~QuicFixedTagVector() {}
 
-bool QuicFixedTagVector::HasSendValues() const {
-  return has_send_values_;
-}
+bool QuicFixedTagVector::HasSendValues() const { return has_send_values_; }
 
 const QuicTagVector& QuicFixedTagVector::GetSendValues() const {
   QUIC_BUG_IF(quic_bug_12743_6, !has_send_values_)
@@ -344,8 +327,7 @@
 }
 
 QuicErrorCode QuicFixedTagVector::ProcessPeerHello(
-    const CryptoHandshakeMessage& peer_hello,
-    HelloType /*hello_type*/,
+    const CryptoHandshakeMessage& peer_hello, HelloType /*hello_type*/,
     std::string* error_details) {
   QUICHE_DCHECK(error_details != nullptr);
   QuicTagVector values;
@@ -378,9 +360,7 @@
 
 QuicFixedSocketAddress::~QuicFixedSocketAddress() {}
 
-bool QuicFixedSocketAddress::HasSendValue() const {
-  return has_send_value_;
-}
+bool QuicFixedSocketAddress::HasSendValue() const { return has_send_value_; }
 
 const QuicSocketAddress& QuicFixedSocketAddress::GetSendValue() const {
   QUIC_BUG_IF(quic_bug_12743_8, !has_send_value_)
@@ -417,8 +397,7 @@
 }
 
 QuicErrorCode QuicFixedSocketAddress::ProcessPeerHello(
-    const CryptoHandshakeMessage& peer_hello,
-    HelloType /*hello_type*/,
+    const CryptoHandshakeMessage& peer_hello, HelloType /*hello_type*/,
     std::string* error_details) {
   absl::string_view address;
   if (!peer_hello.GetStringPiece(tag_, &address)) {
@@ -524,8 +503,7 @@
 }
 
 bool QuicConfig::HasClientRequestedIndependentOption(
-    QuicTag tag,
-    Perspective perspective) const {
+    QuicTag tag, Perspective perspective) const {
   if (perspective == Perspective::IS_SERVER) {
     return (HasReceivedConnectionOptions() &&
             ContainsQuicTag(ReceivedConnectionOptions(), tag));
@@ -1008,9 +986,7 @@
   return stateless_reset_token_.GetReceivedValue();
 }
 
-bool QuicConfig::negotiated() const {
-  return negotiated_;
-}
+bool QuicConfig::negotiated() const { return negotiated_; }
 
 void QuicConfig::SetCreateSessionTagIndicators(QuicTagVector tags) {
   create_session_tag_indicators_ = std::move(tags);
@@ -1039,8 +1015,7 @@
 }
 
 void QuicConfig::ToHandshakeMessage(
-    CryptoHandshakeMessage* out,
-    QuicTransportVersion transport_version) const {
+    CryptoHandshakeMessage* out, QuicTransportVersion transport_version) const {
   // Idle timeout has custom rules that are different from other values.
   // We configure ourselves with the minumum value between the one sent and
   // the one received. Additionally, when QUIC_CRYPTO is used, the server
@@ -1086,8 +1061,7 @@
 }
 
 QuicErrorCode QuicConfig::ProcessPeerHello(
-    const CryptoHandshakeMessage& peer_hello,
-    HelloType hello_type,
+    const CryptoHandshakeMessage& peer_hello, HelloType hello_type,
     std::string* error_details) {
   QUICHE_DCHECK(error_details != nullptr);
 
@@ -1285,8 +1259,7 @@
 }
 
 QuicErrorCode QuicConfig::ProcessTransportParameters(
-    const TransportParameters& params,
-    bool is_resumption,
+    const TransportParameters& params, bool is_resumption,
     std::string* error_details) {
   if (!is_resumption && params.original_destination_connection_id.has_value()) {
     received_original_destination_connection_id_ =
diff --git a/quiche/quic/core/quic_config.h b/quiche/quic/core/quic_config.h
index 71257d7..846872f 100644
--- a/quiche/quic/core/quic_config.h
+++ b/quiche/quic/core/quic_config.h
@@ -55,8 +55,7 @@
   // Selects a mutually acceptable value from those offered in |peer_hello|
   // and those defined in the subclass.
   virtual QuicErrorCode ProcessPeerHello(
-      const CryptoHandshakeMessage& peer_hello,
-      HelloType hello_type,
+      const CryptoHandshakeMessage& peer_hello, HelloType hello_type,
       std::string* error_details) = 0;
 
  protected:
diff --git a/quiche/quic/core/quic_config_test.cc b/quiche/quic/core/quic_config_test.cc
index 9c42158..fc8afe8 100644
--- a/quiche/quic/core/quic_config_test.cc
+++ b/quiche/quic/core/quic_config_test.cc
@@ -34,8 +34,7 @@
 };
 
 // Run all tests with all versions of QUIC.
-INSTANTIATE_TEST_SUITE_P(QuicConfigTests,
-                         QuicConfigTest,
+INSTANTIATE_TEST_SUITE_P(QuicConfigTests, QuicConfigTest,
                          ::testing::ValuesIn(AllSupportedVersions()),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/quic_connection.cc b/quiche/quic/core/quic_connection.cc
index 42341f3..de739d6 100644
--- a/quiche/quic/core/quic_connection.cc
+++ b/quiche/quic/core/quic_connection.cc
@@ -392,9 +392,7 @@
   }
 }
 
-void QuicConnection::ClearQueuedPackets() {
-  buffered_packets_.clear();
-}
+void QuicConnection::ClearQueuedPackets() { buffered_packets_.clear(); }
 
 bool QuicConnection::ValidateConfigConnectionIds(const QuicConfig& config) {
   QUICHE_DCHECK(config.negotiated());
@@ -799,9 +797,7 @@
                   ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
 }
 
-void QuicConnection::OnPacket() {
-  last_packet_decrypted_ = false;
-}
+void QuicConnection::OnPacket() { last_packet_decrypted_ = false; }
 
 void QuicConnection::OnPublicResetPacket(const QuicPublicResetPacket& packet) {
   // Check that any public reset packet with a different connection ID that was
@@ -1135,9 +1131,7 @@
   }
 }
 
-bool QuicConnection::HasPendingAcks() const {
-  return ack_alarm_->IsSet();
-}
+bool QuicConnection::HasPendingAcks() const { return ack_alarm_->IsSet(); }
 
 void QuicConnection::OnUserAgentIdKnown(const std::string& /*user_agent_id*/) {
   sent_packet_manager_.OnUserAgentIdKnown();
@@ -1657,8 +1651,7 @@
                                const QuicSocketAddress& peer_address,
                                const QuicSocketAddress& effective_peer_address,
                                QuicConnection* connection)
-      : QuicPathValidationContext(self_address,
-                                  peer_address,
+      : QuicPathValidationContext(self_address, peer_address,
                                   effective_peer_address),
         connection_(connection) {}
 
@@ -3135,8 +3128,7 @@
 }
 
 bool QuicConnection::ShouldGeneratePacket(
-    HasRetransmittableData retransmittable,
-    IsHandshake handshake) {
+    HasRetransmittableData retransmittable, IsHandshake handshake) {
   QUICHE_DCHECK(handshake != IS_HANDSHAKE ||
                 QuicVersionUsesCryptoFrames(transport_version()))
       << ENDPOINT
@@ -4241,8 +4233,7 @@
 }
 
 void QuicConnection::SetAlternativeDecrypter(
-    EncryptionLevel level,
-    std::unique_ptr<QuicDecrypter> decrypter,
+    EncryptionLevel level, std::unique_ptr<QuicDecrypter> decrypter,
     bool latch_once_used) {
   framer_.SetAlternativeDecrypter(level, std::move(decrypter), latch_once_used);
 
@@ -4253,8 +4244,7 @@
 }
 
 void QuicConnection::InstallDecrypter(
-    EncryptionLevel level,
-    std::unique_ptr<QuicDecrypter> decrypter) {
+    EncryptionLevel level, std::unique_ptr<QuicDecrypter> decrypter) {
   if (level == ENCRYPTION_ZERO_RTT) {
     had_zero_rtt_decrypter_ = true;
   }
@@ -4308,8 +4298,7 @@
 }
 
 void QuicConnection::QueueUndecryptablePacket(
-    const QuicEncryptedPacket& packet,
-    EncryptionLevel decryption_level) {
+    const QuicEncryptedPacket& packet, EncryptionLevel decryption_level) {
   for (const auto& saved_packet : undecryptable_packets_) {
     if (packet.data() == saved_packet.packet->data() &&
         packet.length() == saved_packet.packet->length()) {
@@ -4445,16 +4434,14 @@
 }
 
 void QuicConnection::CloseConnection(
-    QuicErrorCode error,
-    const std::string& details,
+    QuicErrorCode error, const std::string& details,
     ConnectionCloseBehavior connection_close_behavior) {
   CloseConnection(error, NO_IETF_QUIC_ERROR, details,
                   connection_close_behavior);
 }
 
 void QuicConnection::CloseConnection(
-    QuicErrorCode error,
-    QuicIetfTransportErrorCodes ietf_error,
+    QuicErrorCode error, QuicIetfTransportErrorCodes ietf_error,
     const std::string& error_details,
     ConnectionCloseBehavior connection_close_behavior) {
   QUICHE_DCHECK(!error_details.empty());
@@ -4483,8 +4470,7 @@
 }
 
 void QuicConnection::SendConnectionClosePacket(
-    QuicErrorCode error,
-    QuicIetfTransportErrorCodes ietf_error,
+    QuicErrorCode error, QuicIetfTransportErrorCodes ietf_error,
     const std::string& details) {
   // Always use the current path to send CONNECTION_CLOSE.
   QuicPacketCreator::ScopedPeerAddressContext context(
@@ -4579,10 +4565,8 @@
 }
 
 void QuicConnection::TearDownLocalConnectionState(
-    QuicErrorCode error,
-    QuicIetfTransportErrorCodes ietf_error,
-    const std::string& error_details,
-    ConnectionCloseSource source) {
+    QuicErrorCode error, QuicIetfTransportErrorCodes ietf_error,
+    const std::string& error_details, ConnectionCloseSource source) {
   QuicConnectionCloseFrame frame(transport_version(), error, ietf_error,
                                  error_details,
                                  framer_.current_received_frame_type());
@@ -4590,8 +4574,7 @@
 }
 
 void QuicConnection::TearDownLocalConnectionState(
-    const QuicConnectionCloseFrame& frame,
-    ConnectionCloseSource source) {
+    const QuicConnectionCloseFrame& frame, ConnectionCloseSource source) {
   if (!connected_) {
     QUIC_DLOG(INFO) << "Connection is already closed.";
     return;
@@ -4901,8 +4884,7 @@
 }
 
 QuicConnection::ScopedEncryptionLevelContext::ScopedEncryptionLevelContext(
-    QuicConnection* connection,
-    EncryptionLevel encryption_level)
+    QuicConnection* connection, EncryptionLevel encryption_level)
     : connection_(connection), latched_encryption_level_(ENCRYPTION_INITIAL) {
   if (connection_ == nullptr) {
     return;
@@ -4919,16 +4901,14 @@
 }
 
 QuicConnection::BufferedPacket::BufferedPacket(
-    const SerializedPacket& packet,
-    const QuicSocketAddress& self_address,
+    const SerializedPacket& packet, const QuicSocketAddress& self_address,
     const QuicSocketAddress& peer_address)
     : encrypted_buffer(CopyBuffer(packet), packet.encrypted_length),
       self_address(self_address),
       peer_address(peer_address) {}
 
 QuicConnection::BufferedPacket::BufferedPacket(
-    char* encrypted_buffer,
-    QuicPacketLength encrypted_length,
+    char* encrypted_buffer, QuicPacketLength encrypted_length,
     const QuicSocketAddress& self_address,
     const QuicSocketAddress& peer_address)
     : encrypted_buffer(CopyBuffer(encrypted_buffer, encrypted_length),
@@ -5007,8 +4987,7 @@
 // and let the caller to call writer to write the packet and handle write
 // status.
 bool QuicConnection::SendConnectivityProbingPacket(
-    QuicPacketWriter* probing_writer,
-    const QuicSocketAddress& peer_address) {
+    QuicPacketWriter* probing_writer, const QuicSocketAddress& peer_address) {
   QUICHE_DCHECK(peer_address.IsInitialized());
   if (!connected_) {
     QUIC_BUG(quic_bug_10511_31)
@@ -5060,11 +5039,9 @@
 }
 
 bool QuicConnection::WritePacketUsingWriter(
-    std::unique_ptr<SerializedPacket> packet,
-    QuicPacketWriter* writer,
+    std::unique_ptr<SerializedPacket> packet, QuicPacketWriter* writer,
     const QuicSocketAddress& self_address,
-    const QuicSocketAddress& peer_address,
-    bool measure_rtt) {
+    const QuicSocketAddress& peer_address, bool measure_rtt) {
   const QuicTime packet_send_time = clock_->Now();
   QUIC_DVLOG(2) << ENDPOINT
                 << "Sending path probe packet for server connection ID "
@@ -6123,8 +6100,7 @@
 }
 
 SerializedPacketFate QuicConnection::GetSerializedPacketFate(
-    bool is_mtu_discovery,
-    EncryptionLevel encryption_level) {
+    bool is_mtu_discovery, EncryptionLevel encryption_level) {
   if (ShouldDiscardPacket(encryption_level)) {
     return DISCARD;
   }
@@ -6445,8 +6421,7 @@
     const QuicPathFrameBuffer& data_buffer,
     const QuicSocketAddress& self_address,
     const QuicSocketAddress& peer_address,
-    const QuicSocketAddress& effective_peer_address,
-    QuicPacketWriter* writer) {
+    const QuicSocketAddress& effective_peer_address, QuicPacketWriter* writer) {
   if (!framer_.HasEncrypterOfEncryptionLevel(ENCRYPTION_FORWARD_SECURE)) {
     return connected_;
   }
@@ -6711,8 +6686,7 @@
 
 bool QuicConnection::MigratePath(const QuicSocketAddress& self_address,
                                  const QuicSocketAddress& peer_address,
-                                 QuicPacketWriter* writer,
-                                 bool owns_writer) {
+                                 QuicPacketWriter* writer, bool owns_writer) {
   QUICHE_DCHECK(perspective_ == Perspective::IS_CLIENT);
   if (!connected_) {
     if (owns_writer) {
@@ -6824,8 +6798,7 @@
 }
 
 void QuicConnection::MaybeUpdateBytesSentToAlternativeAddress(
-    const QuicSocketAddress& peer_address,
-    QuicByteCount sent_packet_size) {
+    const QuicSocketAddress& peer_address, QuicByteCount sent_packet_size) {
   if (!version().SupportsAntiAmplificationLimit() ||
       perspective_ != Perspective::IS_SERVER) {
     return;
diff --git a/quiche/quic/core/quic_connection.h b/quiche/quic/core/quic_connection.h
index 7577a57..22c2c50 100644
--- a/quiche/quic/core/quic_connection.h
+++ b/quiche/quic/core/quic_connection.h
@@ -468,10 +468,8 @@
                  QuicSocketAddress initial_self_address,
                  QuicSocketAddress initial_peer_address,
                  QuicConnectionHelperInterface* helper,
-                 QuicAlarmFactory* alarm_factory,
-                 QuicPacketWriter* writer,
-                 bool owns_writer,
-                 Perspective perspective,
+                 QuicAlarmFactory* alarm_factory, QuicPacketWriter* writer,
+                 bool owns_writer, Perspective perspective,
                  const ParsedQuicVersionVector& supported_versions);
   QuicConnection(const QuicConnection&) = delete;
   QuicConnection& operator=(const QuicConnection&) = delete;
@@ -506,8 +504,7 @@
   // information.
   void AdjustNetworkParameters(
       const SendAlgorithmInterface::NetworkParams& params);
-  void AdjustNetworkParameters(QuicBandwidth bandwidth,
-                               QuicTime::Delta rtt,
+  void AdjustNetworkParameters(QuicBandwidth bandwidth, QuicTime::Delta rtt,
                                bool allow_cwnd_to_decrease);
 
   // Install a loss detection tuner. Must be called before OnConfigNegotiated.
@@ -522,8 +519,7 @@
   // Sends crypto handshake messages of length |write_length| to the peer in as
   // few packets as possible. Returns the number of bytes consumed from the
   // data.
-  virtual size_t SendCryptoData(EncryptionLevel level,
-                                size_t write_length,
+  virtual size_t SendCryptoData(EncryptionLevel level, size_t write_length,
                                 QuicStreamOffset offset);
 
   // Send the data of length |write_length| to the peer in as few packets as
@@ -531,8 +527,7 @@
   // indicating if the fin bit was consumed.  This does not indicate the data
   // has been sent on the wire: it may have been turned into a packet and queued
   // if the socket was unexpectedly blocked.
-  virtual QuicConsumedData SendStreamData(QuicStreamId id,
-                                          size_t write_length,
+  virtual QuicConsumedData SendStreamData(QuicStreamId id, size_t write_length,
                                           QuicStreamOffset offset,
                                           StreamSendingState state);
 
@@ -547,14 +542,12 @@
   // |connection_close_behavior| determines whether or not a connection close
   // packet is sent to the peer.
   virtual void CloseConnection(
-      QuicErrorCode error,
-      const std::string& details,
+      QuicErrorCode error, const std::string& details,
       ConnectionCloseBehavior connection_close_behavior);
   // Closes the connection, specifying the wire error code |ietf_error|
   // explicitly.
   virtual void CloseConnection(
-      QuicErrorCode error,
-      QuicIetfTransportErrorCodes ietf_error,
+      QuicErrorCode error, QuicIetfTransportErrorCodes ietf_error,
       const std::string& details,
       ConnectionCloseBehavior connection_close_behavior);
 
@@ -702,8 +695,7 @@
   void OnUnrecoverableError(QuicErrorCode error,
                             const std::string& error_details) override;
   SerializedPacketFate GetSerializedPacketFate(
-      bool is_mtu_discovery,
-      EncryptionLevel encryption_level) override;
+      bool is_mtu_discovery, EncryptionLevel encryption_level) override;
 
   // QuicSentPacketManager::NetworkChangeVisitor
   void OnCongestionChange() override;
@@ -958,8 +950,7 @@
   // PATH_CHALLENGE packet is transmitted; if not V99, a Google QUIC padded PING
   // packet is transmitted.
   virtual bool SendConnectivityProbingPacket(
-      QuicPacketWriter* probing_writer,
-      const QuicSocketAddress& peer_address);
+      QuicPacketWriter* probing_writer, const QuicSocketAddress& peer_address);
 
   // Disable MTU discovery on this connection.
   void DisableMtuDiscovery();
@@ -1200,8 +1191,7 @@
   // available CIDs, connection disconnected, etc).
   bool MigratePath(const QuicSocketAddress& self_address,
                    const QuicSocketAddress& peer_address,
-                   QuicPacketWriter* writer,
-                   bool owns_writer);
+                   QuicPacketWriter* writer, bool owns_writer);
 
   // Called to clear the alternative_path_ when path validation failed on the
   // client side.
@@ -1404,8 +1394,7 @@
     BufferedPacket(const SerializedPacket& packet,
                    const QuicSocketAddress& self_address,
                    const QuicSocketAddress& peer_address);
-    BufferedPacket(char* encrypted_buffer,
-                   QuicPacketLength encrypted_length,
+    BufferedPacket(char* encrypted_buffer, QuicPacketLength encrypted_length,
                    const QuicSocketAddress& self_address,
                    const QuicSocketAddress& peer_address);
     BufferedPacket(const BufferedPacket& other) = delete;
@@ -1801,8 +1790,7 @@
   // Increment bytes sent/received on the alternative path if the current packet
   // is sent/received on that path.
   void MaybeUpdateBytesSentToAlternativeAddress(
-      const QuicSocketAddress& peer_address,
-      QuicByteCount sent_packet_size);
+      const QuicSocketAddress& peer_address, QuicByteCount sent_packet_size);
   void MaybeUpdateBytesReceivedFromAlternativeAddress(
       QuicByteCount received_packet_size);
 
diff --git a/quiche/quic/core/quic_connection_id_manager.cc b/quiche/quic/core/quic_connection_id_manager.cc
index db9d097..46ff85f 100644
--- a/quiche/quic/core/quic_connection_id_manager.cc
+++ b/quiche/quic/core/quic_connection_id_manager.cc
@@ -15,8 +15,7 @@
 namespace quic {
 
 QuicConnectionIdData::QuicConnectionIdData(
-    const QuicConnectionId& connection_id,
-    uint64_t sequence_number,
+    const QuicConnectionId& connection_id, uint64_t sequence_number,
     const StatelessResetToken& stateless_reset_token)
     : connection_id(connection_id),
       sequence_number(sequence_number),
@@ -124,8 +123,7 @@
 }
 
 QuicErrorCode QuicPeerIssuedConnectionIdManager::OnNewConnectionIdFrame(
-    const QuicNewConnectionIdFrame& frame,
-    std::string* error_detail) {
+    const QuicNewConnectionIdFrame& frame, std::string* error_detail) {
   if (recent_new_connection_id_sequence_numbers_.Contains(
           frame.sequence_number)) {
     // This frame has a recently seen sequence number. Ignore.
@@ -323,8 +321,7 @@
 }
 
 QuicErrorCode QuicSelfIssuedConnectionIdManager::OnRetireConnectionIdFrame(
-    const QuicRetireConnectionIdFrame& frame,
-    QuicTime::Delta pto_delay,
+    const QuicRetireConnectionIdFrame& frame, QuicTime::Delta pto_delay,
     std::string* error_detail) {
   QUICHE_DCHECK(!active_connection_ids_.empty());
   if (frame.sequence_number > active_connection_ids_.back().second) {
diff --git a/quiche/quic/core/quic_connection_id_manager.h b/quiche/quic/core/quic_connection_id_manager.h
index 11454df..501310b 100644
--- a/quiche/quic/core/quic_connection_id_manager.h
+++ b/quiche/quic/core/quic_connection_id_manager.h
@@ -133,8 +133,7 @@
   QuicNewConnectionIdFrame IssueNewConnectionIdForPreferredAddress();
 
   QuicErrorCode OnRetireConnectionIdFrame(
-      const QuicRetireConnectionIdFrame& frame,
-      QuicTime::Delta pto_delay,
+      const QuicRetireConnectionIdFrame& frame, QuicTime::Delta pto_delay,
       std::string* error_detail);
 
   std::vector<QuicConnectionId> GetUnretiredConnectionIds() const;
diff --git a/quiche/quic/core/quic_connection_id_manager_test.cc b/quiche/quic/core/quic_connection_id_manager_test.cc
index 57e6b87..543f054 100644
--- a/quiche/quic/core/quic_connection_id_manager_test.cc
+++ b/quiche/quic/core/quic_connection_id_manager_test.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "quiche/quic/core/quic_connection_id_manager.h"
+
 #include <cstddef>
 
 #include "quiche/quic/core/quic_connection_id.h"
@@ -519,18 +520,12 @@
  public:
   void OnPeerIssuedConnectionIdRetired() override {}
 
-  MOCK_METHOD(bool,
-              SendNewConnectionId,
-              (const QuicNewConnectionIdFrame& frame),
-              (override));
-  MOCK_METHOD(void,
-              OnNewConnectionIdIssued,
-              (const QuicConnectionId& connection_id),
-              (override));
-  MOCK_METHOD(void,
-              OnSelfIssuedConnectionIdRetired,
-              (const QuicConnectionId& connection_id),
-              (override));
+  MOCK_METHOD(bool, SendNewConnectionId,
+              (const QuicNewConnectionIdFrame& frame), (override));
+  MOCK_METHOD(void, OnNewConnectionIdIssued,
+              (const QuicConnectionId& connection_id), (override));
+  MOCK_METHOD(void, OnSelfIssuedConnectionIdRetired,
+              (const QuicConnectionId& connection_id), (override));
 };
 
 class QuicSelfIssuedConnectionIdManagerTest : public QuicTest {
@@ -556,11 +551,8 @@
   QuicTime::Delta pto_delay_ = QuicTime::Delta::FromMilliseconds(10);
 };
 
-MATCHER_P3(ExpectedNewConnectionIdFrame,
-           connection_id,
-           sequence_number,
-           retire_prior_to,
-           "") {
+MATCHER_P3(ExpectedNewConnectionIdFrame, connection_id, sequence_number,
+           retire_prior_to, "") {
   return (arg.connection_id == connection_id) &&
          (arg.sequence_number == sequence_number) &&
          (arg.retire_prior_to == retire_prior_to);
diff --git a/quiche/quic/core/quic_connection_stats.h b/quiche/quic/core/quic_connection_stats.h
index 46ccf3e..4aaf780 100644
--- a/quiche/quic/core/quic_connection_stats.h
+++ b/quiche/quic/core/quic_connection_stats.h
@@ -19,8 +19,7 @@
 // Structure to hold stats for a QuicConnection.
 struct QUIC_EXPORT_PRIVATE QuicConnectionStats {
   QUIC_EXPORT_PRIVATE friend std::ostream& operator<<(
-      std::ostream& os,
-      const QuicConnectionStats& s);
+      std::ostream& os, const QuicConnectionStats& s);
 
   QuicByteCount bytes_sent = 0;  // Includes retransmissions.
   QuicPacketCount packets_sent = 0;
@@ -100,8 +99,8 @@
   size_t rto_count = 0;  // Count of times the rto timer fired.
   size_t pto_count = 0;
 
-  int64_t min_rtt_us = 0;  // Minimum RTT in microseconds.
-  int64_t srtt_us = 0;     // Smoothed RTT in microseconds.
+  int64_t min_rtt_us = 0;                 // Minimum RTT in microseconds.
+  int64_t srtt_us = 0;                    // Smoothed RTT in microseconds.
   int64_t cwnd_bootstrapping_rtt_us = 0;  // RTT used in cwnd_bootstrapping.
   // The connection's |long_term_mtu_| used for sending packets, populated by
   // QuicConnection::GetStats().
diff --git a/quiche/quic/core/quic_crypto_client_handshaker.cc b/quiche/quic/core/quic_crypto_client_handshaker.cc
index c4a8262..aa963d5 100644
--- a/quiche/quic/core/quic_crypto_client_handshaker.cc
+++ b/quiche/quic/core/quic_crypto_client_handshaker.cc
@@ -25,8 +25,7 @@
     ~ProofVerifierCallbackImpl() {}
 
 void QuicCryptoClientHandshaker::ProofVerifierCallbackImpl::Run(
-    bool ok,
-    const std::string& error_details,
+    bool ok, const std::string& error_details,
     std::unique_ptr<ProofVerifyDetails>* details) {
   if (parent_ == nullptr) {
     return;
@@ -47,10 +46,8 @@
 }
 
 QuicCryptoClientHandshaker::QuicCryptoClientHandshaker(
-    const QuicServerId& server_id,
-    QuicCryptoClientStream* stream,
-    QuicSession* session,
-    std::unique_ptr<ProofVerifyContext> verify_context,
+    const QuicServerId& server_id, QuicCryptoClientStream* stream,
+    QuicSession* session, std::unique_ptr<ProofVerifyContext> verify_context,
     QuicCryptoClientConfig* crypto_config,
     QuicCryptoClientStream::ProofHandler* proof_handler)
     : QuicCryptoHandshaker(stream, session),
@@ -141,9 +138,7 @@
   return num_scup_messages_received_;
 }
 
-std::string QuicCryptoClientHandshaker::chlo_hash() const {
-  return chlo_hash_;
-}
+std::string QuicCryptoClientHandshaker::chlo_hash() const { return chlo_hash_; }
 
 bool QuicCryptoClientHandshaker::encryption_established() const {
   return encryption_established_;
@@ -195,8 +190,7 @@
 }
 
 void QuicCryptoClientHandshaker::OnConnectionClosed(
-    QuicErrorCode /*error*/,
-    ConnectionCloseSource /*source*/) {
+    QuicErrorCode /*error*/, ConnectionCloseSource /*source*/) {
   next_state_ = STATE_CONNECTION_CLOSED;
 }
 
diff --git a/quiche/quic/core/quic_crypto_client_handshaker.h b/quiche/quic/core/quic_crypto_client_handshaker.h
index 07404d6..45d8016 100644
--- a/quiche/quic/core/quic_crypto_client_handshaker.h
+++ b/quiche/quic/core/quic_crypto_client_handshaker.h
@@ -23,10 +23,8 @@
       public QuicCryptoHandshaker {
  public:
   QuicCryptoClientHandshaker(
-      const QuicServerId& server_id,
-      QuicCryptoClientStream* stream,
-      QuicSession* session,
-      std::unique_ptr<ProofVerifyContext> verify_context,
+      const QuicServerId& server_id, QuicCryptoClientStream* stream,
+      QuicSession* session, std::unique_ptr<ProofVerifyContext> verify_context,
       QuicCryptoClientConfig* crypto_config,
       QuicCryptoClientStream::ProofHandler* proof_handler);
   QuicCryptoClientHandshaker(const QuicCryptoClientHandshaker&) = delete;
@@ -93,8 +91,7 @@
     ~ProofVerifierCallbackImpl() override;
 
     // ProofVerifierCallback interface.
-    void Run(bool ok,
-             const std::string& error_details,
+    void Run(bool ok, const std::string& error_details,
              std::unique_ptr<ProofVerifyDetails>* details) override;
 
     // Cancel causes any future callbacks to be ignored. It must be called on
diff --git a/quiche/quic/core/quic_crypto_client_handshaker_test.cc b/quiche/quic/core/quic_crypto_client_handshaker_test.cc
index 65d98f9..cf53185 100644
--- a/quiche/quic/core/quic_crypto_client_handshaker_test.cc
+++ b/quiche/quic/core/quic_crypto_client_handshaker_test.cc
@@ -30,31 +30,24 @@
 
   // ProofVerifier override.
   QuicAsyncStatus VerifyProof(
-      const std::string& /*hostname*/,
-      const uint16_t /*port*/,
+      const std::string& /*hostname*/, const uint16_t /*port*/,
       const std::string& /*server_config*/,
       QuicTransportVersion /*transport_version*/,
       absl::string_view /*chlo_hash*/,
       const std::vector<std::string>& /*certs*/,
-      const std::string& /*cert_sct*/,
-      const std::string& /*signature*/,
-      const ProofVerifyContext* /*context*/,
-      std::string* /*error_details*/,
+      const std::string& /*cert_sct*/, const std::string& /*signature*/,
+      const ProofVerifyContext* /*context*/, std::string* /*error_details*/,
       std::unique_ptr<ProofVerifyDetails>* /*verify_details*/,
       std::unique_ptr<ProofVerifierCallback> /*callback*/) override {
     return QUIC_SUCCESS;
   }
 
   QuicAsyncStatus VerifyCertChain(
-      const std::string& /*hostname*/,
-      const uint16_t /*port*/,
+      const std::string& /*hostname*/, const uint16_t /*port*/,
       const std::vector<std::string>& /*certs*/,
-      const std::string& /*ocsp_response*/,
-      const std::string& /*cert_sct*/,
-      const ProofVerifyContext* /*context*/,
-      std::string* /*error_details*/,
-      std::unique_ptr<ProofVerifyDetails>* /*details*/,
-      uint8_t* /*out_alert*/,
+      const std::string& /*ocsp_response*/, const std::string& /*cert_sct*/,
+      const ProofVerifyContext* /*context*/, std::string* /*error_details*/,
+      std::unique_ptr<ProofVerifyDetails>* /*details*/, uint8_t* /*out_alert*/,
       std::unique_ptr<ProofVerifierCallback> /*callback*/) override {
     return QUIC_SUCCESS;
   }
@@ -101,8 +94,7 @@
   void ComputeTlsSignature(
       const QuicSocketAddress& /*server_address*/,
       const QuicSocketAddress& /*client_address*/,
-      const std::string& /*hostname*/,
-      uint16_t /*signature_algorit*/,
+      const std::string& /*hostname*/, uint16_t /*signature_algorit*/,
       absl::string_view /*in*/,
       std::unique_ptr<SignatureCallback> callback) override {
     callback->Run(true, "Dummy signature", /*details=*/nullptr);
@@ -118,17 +110,13 @@
 
 class Handshaker : public QuicCryptoClientHandshaker {
  public:
-  Handshaker(const QuicServerId& server_id,
-             QuicCryptoClientStream* stream,
+  Handshaker(const QuicServerId& server_id, QuicCryptoClientStream* stream,
              QuicSession* session,
              std::unique_ptr<ProofVerifyContext> verify_context,
              QuicCryptoClientConfig* crypto_config,
              QuicCryptoClientStream::ProofHandler* proof_handler)
-      : QuicCryptoClientHandshaker(server_id,
-                                   stream,
-                                   session,
-                                   std::move(verify_context),
-                                   crypto_config,
+      : QuicCryptoClientHandshaker(server_id, stream, session,
+                                   std::move(verify_context), crypto_config,
                                    proof_handler) {}
 
   void DoSendCHLOTest(QuicCryptoClientConfig::CachedState* cached) {
@@ -145,25 +133,16 @@
         helper_(),
         alarm_factory_(),
         server_id_("host", 123),
-        connection_(new test::MockQuicConnection(&helper_,
-                                                 &alarm_factory_,
-                                                 Perspective::IS_CLIENT,
-                                                 {version_})),
+        connection_(new test::MockQuicConnection(
+            &helper_, &alarm_factory_, Perspective::IS_CLIENT, {version_})),
         session_(connection_, false),
         crypto_client_config_(std::make_unique<InsecureProofVerifier>()),
         client_stream_(
-            new QuicCryptoClientStream(server_id_,
-                                       &session_,
-                                       nullptr,
-                                       &crypto_client_config_,
-                                       &proof_handler_,
+            new QuicCryptoClientStream(server_id_, &session_, nullptr,
+                                       &crypto_client_config_, &proof_handler_,
                                        /*has_application_state = */ false)),
-        handshaker_(server_id_,
-                    client_stream_,
-                    &session_,
-                    nullptr,
-                    &crypto_client_config_,
-                    &proof_handler_),
+        handshaker_(server_id_, client_stream_, &session_, nullptr,
+                    &crypto_client_config_, &proof_handler_),
         state_() {
     // Session takes the ownership of the client stream! (but handshaker also
     // takes a reference to it, but doesn't take the ownership).
@@ -198,8 +177,7 @@
 };
 
 INSTANTIATE_TEST_SUITE_P(
-    QuicCryptoClientHandshakerTests,
-    QuicCryptoClientHandshakerTest,
+    QuicCryptoClientHandshakerTests, QuicCryptoClientHandshakerTest,
     ::testing::ValuesIn(AllSupportedVersionsWithQuicCrypto()),
     ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/quic_crypto_client_stream.cc b/quiche/quic/core/quic_crypto_client_stream.cc
index f9339dc..60d49ed 100644
--- a/quiche/quic/core/quic_crypto_client_stream.cc
+++ b/quiche/quic/core/quic_crypto_client_stream.cc
@@ -28,11 +28,9 @@
     : QuicCryptoStream(session) {}
 
 QuicCryptoClientStream::QuicCryptoClientStream(
-    const QuicServerId& server_id,
-    QuicSession* session,
+    const QuicServerId& server_id, QuicSession* session,
     std::unique_ptr<ProofVerifyContext> verify_context,
-    QuicCryptoClientConfig* crypto_config,
-    ProofHandler* proof_handler,
+    QuicCryptoClientConfig* crypto_config, ProofHandler* proof_handler,
     bool has_application_state)
     : QuicCryptoClientStreamBase(session) {
   QUICHE_DCHECK_EQ(Perspective::IS_CLIENT,
diff --git a/quiche/quic/core/quic_crypto_client_stream.h b/quiche/quic/core/quic_crypto_client_stream.h
index 64b110c..96abfec 100644
--- a/quiche/quic/core/quic_crypto_client_stream.h
+++ b/quiche/quic/core/quic_crypto_client_stream.h
@@ -242,8 +242,7 @@
         const ProofVerifyDetails& verify_details) = 0;
   };
 
-  QuicCryptoClientStream(const QuicServerId& server_id,
-                         QuicSession* session,
+  QuicCryptoClientStream(const QuicServerId& server_id, QuicSession* session,
                          std::unique_ptr<ProofVerifyContext> verify_context,
                          QuicCryptoClientConfig* crypto_config,
                          ProofHandler* proof_handler,
diff --git a/quiche/quic/core/quic_crypto_handshaker.cc b/quiche/quic/core/quic_crypto_handshaker.cc
index 57c7035..7ecc232 100644
--- a/quiche/quic/core/quic_crypto_handshaker.cc
+++ b/quiche/quic/core/quic_crypto_handshaker.cc
@@ -20,8 +20,7 @@
 QuicCryptoHandshaker::~QuicCryptoHandshaker() {}
 
 void QuicCryptoHandshaker::SendHandshakeMessage(
-    const CryptoHandshakeMessage& message,
-    EncryptionLevel level) {
+    const CryptoHandshakeMessage& message, EncryptionLevel level) {
   QUIC_DVLOG(1) << ENDPOINT << "Sending " << message.DebugString();
   session()->NeuterUnencryptedData();
   session()->OnCryptoHandshakeMessageSent(message);
diff --git a/quiche/quic/core/quic_crypto_server_stream.cc b/quiche/quic/core/quic_crypto_server_stream.cc
index 12ac8de..cca4890 100644
--- a/quiche/quic/core/quic_crypto_server_stream.cc
+++ b/quiche/quic/core/quic_crypto_server_stream.cc
@@ -26,8 +26,7 @@
       : parent_(parent), result_(result) {}
 
   void Run(
-      QuicErrorCode error,
-      const std::string& error_details,
+      QuicErrorCode error, const std::string& error_details,
       std::unique_ptr<CryptoHandshakeMessage> message,
       std::unique_ptr<DiversificationNonce> diversification_nonce,
       std::unique_ptr<ProofSource::Details> proof_source_details) override {
@@ -51,8 +50,7 @@
 
 QuicCryptoServerStream::QuicCryptoServerStream(
     const QuicCryptoServerConfig* crypto_config,
-    QuicCompressedCertsCache* compressed_certs_cache,
-    QuicSession* session,
+    QuicCompressedCertsCache* compressed_certs_cache, QuicSession* session,
     QuicCryptoServerStreamBase::Helper* helper)
     : QuicCryptoServerStreamBase(session),
       QuicCryptoHandshaker(this, session),
@@ -156,8 +154,7 @@
 void QuicCryptoServerStream::
     FinishProcessingHandshakeMessageAfterProcessClientHello(
         const ValidateClientHelloResultCallback::Result& result,
-        QuicErrorCode error,
-        const std::string& error_details,
+        QuicErrorCode error, const std::string& error_details,
         std::unique_ptr<CryptoHandshakeMessage> reply,
         std::unique_ptr<DiversificationNonce> diversification_nonce,
         std::unique_ptr<ProofSource::Details> proof_source_details) {
@@ -278,8 +275,7 @@
 
 // From BuildServerConfigUpdateMessageResultCallback
 void QuicCryptoServerStream::SendServerConfigUpdateCallback::Run(
-    bool ok,
-    const CryptoHandshakeMessage& message) {
+    bool ok, const CryptoHandshakeMessage& message) {
   if (parent_ == nullptr) {
     return;
   }
@@ -287,8 +283,7 @@
 }
 
 void QuicCryptoServerStream::FinishSendServerConfigUpdate(
-    bool ok,
-    const CryptoHandshakeMessage& message) {
+    bool ok, const CryptoHandshakeMessage& message) {
   // Clear the callback that got us here.
   QUICHE_DCHECK(send_server_config_update_cb_ != nullptr);
   send_server_config_update_cb_ = nullptr;
@@ -353,9 +348,7 @@
   }
 }
 
-void QuicCryptoServerStream::OnHandshakeDoneReceived() {
-  QUICHE_DCHECK(false);
-}
+void QuicCryptoServerStream::OnHandshakeDoneReceived() { QUICHE_DCHECK(false); }
 
 void QuicCryptoServerStream::OnNewTokenReceived(absl::string_view /*token*/) {
   QUICHE_DCHECK(false);
@@ -516,9 +509,7 @@
     QuicCryptoServerStream* parent)
     : parent_(parent) {}
 
-void QuicCryptoServerStream::ValidateCallback::Cancel() {
-  parent_ = nullptr;
-}
+void QuicCryptoServerStream::ValidateCallback::Cancel() { parent_ = nullptr; }
 
 void QuicCryptoServerStream::ValidateCallback::Run(
     quiche::QuicheReferenceCountedPointer<Result> result,
diff --git a/quiche/quic/core/quic_crypto_server_stream.h b/quiche/quic/core/quic_crypto_server_stream.h
index c66b229..2f7fb46 100644
--- a/quiche/quic/core/quic_crypto_server_stream.h
+++ b/quiche/quic/core/quic_crypto_server_stream.h
@@ -170,8 +170,7 @@
   // ProcessClientHello has been called.
   void FinishProcessingHandshakeMessageAfterProcessClientHello(
       const ValidateClientHelloResultCallback::Result& result,
-      QuicErrorCode error,
-      const std::string& error_details,
+      QuicErrorCode error, const std::string& error_details,
       std::unique_ptr<CryptoHandshakeMessage> reply,
       std::unique_ptr<DiversificationNonce> diversification_nonce,
       std::unique_ptr<ProofSource::Details> proof_source_details);
diff --git a/quiche/quic/core/quic_crypto_server_stream_base.cc b/quiche/quic/core/quic_crypto_server_stream_base.cc
index 7cff108..41af6e1 100644
--- a/quiche/quic/core/quic_crypto_server_stream_base.cc
+++ b/quiche/quic/core/quic_crypto_server_stream_base.cc
@@ -29,8 +29,7 @@
 
 std::unique_ptr<QuicCryptoServerStreamBase> CreateCryptoServerStream(
     const QuicCryptoServerConfig* crypto_config,
-    QuicCompressedCertsCache* compressed_certs_cache,
-    QuicSession* session,
+    QuicCompressedCertsCache* compressed_certs_cache, QuicSession* session,
     QuicCryptoServerStreamBase::Helper* helper) {
   switch (session->connection()->version().handshake_protocol) {
     case PROTOCOL_QUIC_CRYPTO:
diff --git a/quiche/quic/core/quic_crypto_server_stream_test.cc b/quiche/quic/core/quic_crypto_server_stream_test.cc
index 649f340..6f743d9 100644
--- a/quiche/quic/core/quic_crypto_server_stream_test.cc
+++ b/quiche/quic/core/quic_crypto_server_stream_test.cc
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "quiche/quic/core/quic_crypto_server_stream_base.h"
-
 #include <map>
 #include <memory>
 #include <utility>
@@ -20,6 +18,7 @@
 #include "quiche/quic/core/crypto/quic_encrypter.h"
 #include "quiche/quic/core/crypto/quic_random.h"
 #include "quiche/quic/core/quic_crypto_client_stream.h"
+#include "quiche/quic/core/quic_crypto_server_stream_base.h"
 #include "quiche/quic/core/quic_packets.h"
 #include "quiche/quic/core/quic_session.h"
 #include "quiche/quic/core/quic_utils.h"
@@ -59,10 +58,9 @@
   }
 
   explicit QuicCryptoServerStreamTest(std::unique_ptr<ProofSource> proof_source)
-      : server_crypto_config_(QuicCryptoServerConfig::TESTING,
-                              QuicRandom::GetInstance(),
-                              std::move(proof_source),
-                              KeyExchangeSource::Default()),
+      : server_crypto_config_(
+            QuicCryptoServerConfig::TESTING, QuicRandom::GetInstance(),
+            std::move(proof_source), KeyExchangeSource::Default()),
         server_compressed_certs_cache_(
             QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
         server_id_(kServerHostname, kServerPort, false),
@@ -95,12 +93,11 @@
     EXPECT_CALL(*server_session_->helper(), CanAcceptClientHello(_, _, _, _, _))
         .Times(testing::AnyNumber());
     EXPECT_CALL(*server_session_, SelectAlpn(_))
-        .WillRepeatedly(
-            [this](const std::vector<absl::string_view>& alpns) {
-              return std::find(
-                  alpns.cbegin(), alpns.cend(),
-                  AlpnForVersion(server_session_->connection()->version()));
-            });
+        .WillRepeatedly([this](const std::vector<absl::string_view>& alpns) {
+          return std::find(
+              alpns.cbegin(), alpns.cend(),
+              AlpnForVersion(server_session_->connection()->version()));
+        });
     crypto_test_utils::SetupCryptoServerConfigForTest(
         server_connection_->clock(), server_connection_->random_generator(),
         &server_crypto_config_);
diff --git a/quiche/quic/core/quic_crypto_stream.cc b/quiche/quic/core/quic_crypto_stream.cc
index 1f442de..a669982 100644
--- a/quiche/quic/core/quic_crypto_stream.cc
+++ b/quiche/quic/core/quic_crypto_stream.cc
@@ -47,8 +47,7 @@
 
 // static
 QuicByteCount QuicCryptoStream::CryptoMessageFramingOverhead(
-    QuicTransportVersion version,
-    QuicConnectionId connection_id) {
+    QuicTransportVersion version, QuicConnectionId connection_id) {
   QUICHE_DCHECK(
       QuicUtils::IsConnectionIdValidForVersion(connection_id, version));
   QuicVariableLengthIntegerLength retry_token_length_length =
@@ -106,8 +105,7 @@
 }
 
 void QuicCryptoStream::OnDataAvailableInSequencer(
-    QuicStreamSequencer* sequencer,
-    EncryptionLevel level) {
+    QuicStreamSequencer* sequencer, EncryptionLevel level) {
   struct iovec iov;
   while (sequencer->GetReadableRegion(&iov)) {
     absl::string_view data(static_cast<char*>(iov.iov_base), iov.iov_len);
@@ -322,10 +320,8 @@
 }
 
 QuicConsumedData QuicCryptoStream::RetransmitStreamDataAtLevel(
-    QuicStreamOffset retransmission_offset,
-    QuicByteCount retransmission_length,
-    EncryptionLevel encryption_level,
-    TransmissionType type) {
+    QuicStreamOffset retransmission_offset, QuicByteCount retransmission_length,
+    EncryptionLevel encryption_level, TransmissionType type) {
   QUICHE_DCHECK(type == HANDSHAKE_RETRANSMISSION || type == PTO_RETRANSMISSION);
   const auto consumed = stream_delegate()->WritevData(
       id(), retransmission_length, retransmission_offset, NO_FIN, type,
@@ -442,8 +438,7 @@
   return false;
 }
 
-bool QuicCryptoStream::IsFrameOutstanding(EncryptionLevel level,
-                                          size_t offset,
+bool QuicCryptoStream::IsFrameOutstanding(EncryptionLevel level, size_t offset,
                                           size_t length) const {
   if (!QuicVersionUsesCryptoFrames(session()->transport_version())) {
     // This only happens if a client was originally configured for a version
@@ -470,8 +465,7 @@
 }
 
 QuicCryptoStream::CryptoSubstream::CryptoSubstream(
-    QuicCryptoStream* crypto_stream,
-    EncryptionLevel)
+    QuicCryptoStream* crypto_stream, EncryptionLevel)
     : sequencer(crypto_stream),
       send_buffer(crypto_stream->session()
                       ->connection()
diff --git a/quiche/quic/core/quic_crypto_stream.h b/quiche/quic/core/quic_crypto_stream.h
index 61c4908..9e9b870 100644
--- a/quiche/quic/core/quic_crypto_stream.h
+++ b/quiche/quic/core/quic_crypto_stream.h
@@ -46,8 +46,7 @@
   // Returns the per-packet framing overhead associated with sending a
   // handshake message for |version|.
   static QuicByteCount CryptoMessageFramingOverhead(
-      QuicTransportVersion version,
-      QuicConnectionId connection_id);
+      QuicTransportVersion version, QuicConnectionId connection_id);
 
   // QuicStream implementation
   void OnStreamFrame(const QuicStreamFrame& frame) override;
@@ -184,16 +183,13 @@
   void WritePendingRetransmission() override;
 
   // Override to send unacked crypto data with the appropriate encryption level.
-  bool RetransmitStreamData(QuicStreamOffset offset,
-                            QuicByteCount data_length,
-                            bool fin,
-                            TransmissionType type) override;
+  bool RetransmitStreamData(QuicStreamOffset offset, QuicByteCount data_length,
+                            bool fin, TransmissionType type) override;
 
   // Sends stream retransmission data at |encryption_level|.
   QuicConsumedData RetransmitStreamDataAtLevel(
       QuicStreamOffset retransmission_offset,
-      QuicByteCount retransmission_length,
-      EncryptionLevel encryption_level,
+      QuicByteCount retransmission_length, EncryptionLevel encryption_level,
       TransmissionType type);
 
   // Returns the number of bytes of handshake data that have been received from
@@ -207,10 +203,8 @@
   // Writes |data_length| of data of a crypto frame to |writer|. The data
   // written is from the send buffer for encryption level |level| and starts at
   // |offset|.
-  bool WriteCryptoFrame(EncryptionLevel level,
-                        QuicStreamOffset offset,
-                        QuicByteCount data_length,
-                        QuicDataWriter* writer);
+  bool WriteCryptoFrame(EncryptionLevel level, QuicStreamOffset offset,
+                        QuicByteCount data_length, QuicDataWriter* writer);
 
   // Called when data from a CRYPTO frame is considered lost. The lost data is
   // identified by the encryption level, offset, and length in |crypto_frame|.
@@ -229,8 +223,7 @@
 
   // Returns true if any portion of the data at encryption level |level|
   // starting at |offset| for |length| bytes is outstanding.
-  bool IsFrameOutstanding(EncryptionLevel level,
-                          size_t offset,
+  bool IsFrameOutstanding(EncryptionLevel level, size_t offset,
                           size_t length) const;
 
   // Returns true if the crypto handshake is still waiting for acks of sent
diff --git a/quiche/quic/core/quic_crypto_stream_test.cc b/quiche/quic/core/quic_crypto_stream_test.cc
index 4b298c3..6df4983 100644
--- a/quiche/quic/core/quic_crypto_stream_test.cc
+++ b/quiche/quic/core/quic_crypto_stream_test.cc
@@ -103,8 +103,7 @@
 class QuicCryptoStreamTest : public QuicTest {
  public:
   QuicCryptoStreamTest()
-      : connection_(new MockQuicConnection(&helper_,
-                                           &alarm_factory_,
+      : connection_(new MockQuicConnection(&helper_, &alarm_factory_,
                                            Perspective::IS_CLIENT)),
         session_(connection_, /*create_mock_crypto_stream=*/false) {
     EXPECT_CALL(*static_cast<MockPacketWriter*>(connection_->writer()),
diff --git a/quiche/quic/core/quic_data_reader.cc b/quiche/quic/core/quic_data_reader.cc
index e82c598..1a06057 100644
--- a/quiche/quic/core/quic_data_reader.cc
+++ b/quiche/quic/core/quic_data_reader.cc
@@ -19,8 +19,7 @@
 QuicDataReader::QuicDataReader(const char* data, const size_t len)
     : QuicDataReader(data, len, quiche::NETWORK_BYTE_ORDER) {}
 
-QuicDataReader::QuicDataReader(const char* data,
-                               const size_t len,
+QuicDataReader::QuicDataReader(const char* data, const size_t len,
                                quiche::Endianness endianness)
     : quiche::QuicheDataReader(data, len, endianness) {}
 
diff --git a/quiche/quic/core/quic_data_reader.h b/quiche/quic/core/quic_data_reader.h
index c21f2be..0a67df8 100644
--- a/quiche/quic/core/quic_data_reader.h
+++ b/quiche/quic/core/quic_data_reader.h
@@ -40,8 +40,7 @@
   QuicDataReader(const char* data, const size_t len);
   // Constructs a reader using the specified endianness.
   // Caller must provide an underlying buffer to work on.
-  QuicDataReader(const char* data,
-                 const size_t len,
+  QuicDataReader(const char* data, const size_t len,
                  quiche::Endianness endianness);
   QuicDataReader(const QuicDataReader&) = delete;
   QuicDataReader& operator=(const QuicDataReader&) = delete;
diff --git a/quiche/quic/core/quic_data_writer.cc b/quiche/quic/core/quic_data_writer.cc
index 571d2b0..4fbd3b6 100644
--- a/quiche/quic/core/quic_data_writer.cc
+++ b/quiche/quic/core/quic_data_writer.cc
@@ -19,8 +19,7 @@
 QuicDataWriter::QuicDataWriter(size_t size, char* buffer)
     : quiche::QuicheDataWriter(size, buffer) {}
 
-QuicDataWriter::QuicDataWriter(size_t size,
-                               char* buffer,
+QuicDataWriter::QuicDataWriter(size_t size, char* buffer,
                                quiche::Endianness endianness)
     : quiche::QuicheDataWriter(size, buffer, endianness) {}
 
@@ -190,8 +189,7 @@
 }
 
 bool QuicDataWriter::WriteVarInt62(
-    uint64_t value,
-    QuicVariableLengthIntegerLength write_length) {
+    uint64_t value, QuicVariableLengthIntegerLength write_length) {
   QUICHE_DCHECK_EQ(endianness(), quiche::NETWORK_BYTE_ORDER);
 
   size_t remaining_bytes = remaining();
diff --git a/quiche/quic/core/quic_data_writer_test.cc b/quiche/quic/core/quic_data_writer_test.cc
index 40ad70e..5d20c84 100644
--- a/quiche/quic/core/quic_data_writer_test.cc
+++ b/quiche/quic/core/quic_data_writer_test.cc
@@ -25,9 +25,7 @@
 namespace test {
 namespace {
 
-char* AsChars(unsigned char* data) {
-  return reinterpret_cast<char*>(data);
-}
+char* AsChars(unsigned char* data) { return reinterpret_cast<char*>(data); }
 
 struct TestParams {
   explicit TestParams(quiche::Endianness endianness) : endianness(endianness) {}
@@ -53,8 +51,7 @@
 
 class QuicDataWriterTest : public QuicTestWithParam<TestParams> {};
 
-INSTANTIATE_TEST_SUITE_P(QuicDataWriterTests,
-                         QuicDataWriterTest,
+INSTANTIATE_TEST_SUITE_P(QuicDataWriterTests, QuicDataWriterTest,
                          ::testing::ValuesIn(GetTestParams()),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/quic_datagram_queue.cc b/quiche/quic/core/quic_datagram_queue.cc
index 412eeab..1260554 100644
--- a/quiche/quic/core/quic_datagram_queue.cc
+++ b/quiche/quic/core/quic_datagram_queue.cc
@@ -12,7 +12,6 @@
 
 namespace quic {
 
-
 constexpr float kExpiryInMinRtts = 1.25;
 constexpr float kMinPacingWindows = 4;
 
diff --git a/quiche/quic/core/quic_datagram_queue_test.cc b/quiche/quic/core/quic_datagram_queue_test.cc
index 9cb2c3c..7895941 100644
--- a/quiche/quic/core/quic_datagram_queue_test.cc
+++ b/quiche/quic/core/quic_datagram_queue_test.cc
@@ -21,7 +21,6 @@
 namespace test {
 namespace {
 
-
 using testing::_;
 using testing::ElementsAre;
 using testing::Return;
@@ -60,8 +59,7 @@
 class QuicDatagramQueueTestBase : public QuicTest {
  protected:
   QuicDatagramQueueTestBase()
-      : connection_(new MockQuicConnection(&helper_,
-                                           &alarm_factory_,
+      : connection_(new MockQuicConnection(&helper_, &alarm_factory_,
                                            Perspective::IS_CLIENT)),
         session_(connection_) {
     session_.SetCryptoStream(new EstablishedCryptoStream(&session_));
diff --git a/quiche/quic/core/quic_default_packet_writer.cc b/quiche/quic/core/quic_default_packet_writer.cc
index 744591b..3ba64b0 100644
--- a/quiche/quic/core/quic_default_packet_writer.cc
+++ b/quiche/quic/core/quic_default_packet_writer.cc
@@ -14,11 +14,8 @@
 QuicDefaultPacketWriter::~QuicDefaultPacketWriter() = default;
 
 WriteResult QuicDefaultPacketWriter::WritePacket(
-    const char* buffer,
-    size_t buf_len,
-    const QuicIpAddress& self_address,
-    const QuicSocketAddress& peer_address,
-    PerPacketOptions* options) {
+    const char* buffer, size_t buf_len, const QuicIpAddress& self_address,
+    const QuicSocketAddress& peer_address, PerPacketOptions* options) {
   QUICHE_DCHECK(!write_blocked_);
   QUICHE_DCHECK(nullptr == options)
       << "QuicDefaultPacketWriter does not accept any options.";
@@ -33,13 +30,9 @@
   return result;
 }
 
-bool QuicDefaultPacketWriter::IsWriteBlocked() const {
-  return write_blocked_;
-}
+bool QuicDefaultPacketWriter::IsWriteBlocked() const { return write_blocked_; }
 
-void QuicDefaultPacketWriter::SetWritable() {
-  write_blocked_ = false;
-}
+void QuicDefaultPacketWriter::SetWritable() { write_blocked_ = false; }
 
 absl::optional<int> QuicDefaultPacketWriter::MessageTooBigErrorCode() const {
   return EMSGSIZE;
@@ -50,13 +43,9 @@
   return kMaxOutgoingPacketSize;
 }
 
-bool QuicDefaultPacketWriter::SupportsReleaseTime() const {
-  return false;
-}
+bool QuicDefaultPacketWriter::SupportsReleaseTime() const { return false; }
 
-bool QuicDefaultPacketWriter::IsBatchMode() const {
-  return false;
-}
+bool QuicDefaultPacketWriter::IsBatchMode() const { return false; }
 
 QuicPacketBuffer QuicDefaultPacketWriter::GetNextWriteLocation(
     const QuicIpAddress& /*self_address*/,
diff --git a/quiche/quic/core/quic_default_packet_writer.h b/quiche/quic/core/quic_default_packet_writer.h
index ad76cfa..b2a0a86 100644
--- a/quiche/quic/core/quic_default_packet_writer.h
+++ b/quiche/quic/core/quic_default_packet_writer.h
@@ -24,8 +24,7 @@
   ~QuicDefaultPacketWriter() override;
 
   // QuicPacketWriter
-  WriteResult WritePacket(const char* buffer,
-                          size_t buf_len,
+  WriteResult WritePacket(const char* buffer, size_t buf_len,
                           const QuicIpAddress& self_address,
                           const QuicSocketAddress& peer_address,
                           PerPacketOptions* options) override;
diff --git a/quiche/quic/core/quic_dispatcher.cc b/quiche/quic/core/quic_dispatcher.cc
index d5344a0..e133bb0 100644
--- a/quiche/quic/core/quic_dispatcher.cc
+++ b/quiche/quic/core/quic_dispatcher.cc
@@ -124,8 +124,7 @@
     }
     return WRITE_FAILED;
   }
-  bool WriteCryptoData(EncryptionLevel /*level*/,
-                       QuicStreamOffset offset,
+  bool WriteCryptoData(EncryptionLevel /*level*/, QuicStreamOffset offset,
                        QuicByteCount data_length,
                        QuicDataWriter* writer) override {
     return send_buffer_.WriteStreamData(offset, data_length, writer);
@@ -153,8 +152,7 @@
                                 QuicTimeWaitListManager* time_wait_list_manager)
       : server_connection_id_(server_connection_id),
         framer_(ParsedQuicVersionVector{version},
-                /*unused*/ QuicTime::Zero(),
-                Perspective::IS_SERVER,
+                /*unused*/ QuicTime::Zero(), Perspective::IS_SERVER,
                 /*unused*/ kQuicDefaultConnectionIdLength),
         collector_(helper->GetStreamSendBufferAllocator()),
         creator_(server_connection_id, &framer_, &collector_),
@@ -171,8 +169,7 @@
   // Generates a packet containing a CONNECTION_CLOSE frame specifying
   // |error_code| and |error_details| and add the connection to time wait.
   void CloseConnection(QuicErrorCode error_code,
-                       const std::string& error_details,
-                       bool ietf_quic,
+                       const std::string& error_details, bool ietf_quic,
                        std::vector<QuicConnectionId> active_connection_ids) {
     SerializeConnectionClosePacket(error_code, error_details);
 
@@ -1115,13 +1112,9 @@
 }
 
 void QuicDispatcher::StatelesslyTerminateConnection(
-    QuicConnectionId server_connection_id,
-    PacketHeaderFormat format,
-    bool version_flag,
-    bool use_length_prefix,
-    ParsedQuicVersion version,
-    QuicErrorCode error_code,
-    const std::string& error_details,
+    QuicConnectionId server_connection_id, PacketHeaderFormat format,
+    bool version_flag, bool use_length_prefix, ParsedQuicVersion version,
+    QuicErrorCode error_code, const std::string& error_details,
     QuicTimeWaitListManager::TimeWaitAction action) {
   if (format != IETF_QUIC_LONG_HEADER_PACKET && !version_flag) {
     QUIC_DVLOG(1) << "Statelessly terminating " << server_connection_id
@@ -1258,8 +1251,7 @@
 }
 
 void QuicDispatcher::OnBufferPacketFailure(
-    EnqueuePacketResult result,
-    QuicConnectionId server_connection_id) {
+    EnqueuePacketResult result, QuicConnectionId server_connection_id) {
   QUIC_DLOG(INFO) << "Fail to buffer packet on connection "
                   << server_connection_id << " because of " << result;
 }
@@ -1360,13 +1352,9 @@
   --new_sessions_allowed_per_event_loop_;
 }
 
-bool QuicDispatcher::ShouldDestroySessionAsynchronously() {
-  return true;
-}
+bool QuicDispatcher::ShouldDestroySessionAsynchronously() { return true; }
 
-void QuicDispatcher::SetLastError(QuicErrorCode error) {
-  last_error_ = error;
-}
+void QuicDispatcher::SetLastError(QuicErrorCode error) { last_error_ = error; }
 
 bool QuicDispatcher::OnFailedToDispatchPacket(
     const ReceivedPacketInfo& /*packet_info*/) {
@@ -1378,8 +1366,7 @@
 }
 
 void QuicDispatcher::DeliverPacketsToSession(
-    const std::list<BufferedPacket>& packets,
-    QuicSession* session) {
+    const std::list<BufferedPacket>& packets, QuicSession* session) {
   for (const BufferedPacket& packet : packets) {
     session->ProcessUdpPacket(packet.self_address, packet.peer_address,
                               *(packet.packet));
diff --git a/quiche/quic/core/quic_dispatcher.h b/quiche/quic/core/quic_dispatcher.h
index e529eda..74ac694 100644
--- a/quiche/quic/core/quic_dispatcher.h
+++ b/quiche/quic/core/quic_dispatcher.h
@@ -49,8 +49,7 @@
       quiche::QuicheLinkedHashMap<QuicBlockedWriterInterface*, bool>;
 
   QuicDispatcher(
-      const QuicConfig* config,
-      const QuicCryptoServerConfig* crypto_config,
+      const QuicConfig* config, const QuicCryptoServerConfig* crypto_config,
       QuicVersionManager* version_manager,
       std::unique_ptr<QuicConnectionHelperInterface> helper,
       std::unique_ptr<QuicCryptoServerStreamBase::Helper> session_helper,
@@ -83,8 +82,7 @@
   // QuicTimeWaitListManager::Visitor):
   // Ensure that the closed connection is cleaned up asynchronously.
   void OnConnectionClosed(QuicConnectionId server_connection_id,
-                          QuicErrorCode error,
-                          const std::string& error_details,
+                          QuicErrorCode error, const std::string& error_details,
                           ConnectionCloseSource source) override;
 
   // QuicSession::Visitor interface implementation (via inheritance of
@@ -122,8 +120,7 @@
       QuicConnectionId server_connection_id) override;
 
   using ReferenceCountedSessionMap =
-      absl::flat_hash_map<QuicConnectionId,
-                          std::shared_ptr<QuicSession>,
+      absl::flat_hash_map<QuicConnectionId, std::shared_ptr<QuicSession>,
                           QuicConnectionIdHash>;
 
   size_t NumSessions() const;
@@ -134,8 +131,9 @@
   // Clear recent_stateless_reset_addresses_.
   void ClearStatelessResetAddresses();
 
-  using ConnectionIdMap = absl::
-      flat_hash_map<QuicConnectionId, QuicConnectionId, QuicConnectionIdHash>;
+  using ConnectionIdMap =
+      absl::flat_hash_map<QuicConnectionId, QuicConnectionId,
+                          QuicConnectionIdHash>;
 
   // QuicBufferedPacketStore::VisitorInterface implementation.
   void OnExpiredPackets(QuicConnectionId server_connection_id,
@@ -308,8 +306,7 @@
   // to the time-wait list.  The caller needs to manually remove the session
   // from the map after that.
   void CleanUpSession(QuicConnectionId server_connection_id,
-                      QuicConnection* connection,
-                      QuicErrorCode error,
+                      QuicConnection* connection, QuicErrorCode error,
                       const std::string& error_details,
                       ConnectionCloseSource source);
 
@@ -318,13 +315,9 @@
   // connection to time wait list or 2) directly add connection to time wait
   // list with |action|.
   void StatelesslyTerminateConnection(
-      QuicConnectionId server_connection_id,
-      PacketHeaderFormat format,
-      bool version_flag,
-      bool use_length_prefix,
-      ParsedQuicVersion version,
-      QuicErrorCode error_code,
-      const std::string& error_details,
+      QuicConnectionId server_connection_id, PacketHeaderFormat format,
+      bool version_flag, bool use_length_prefix, ParsedQuicVersion version,
+      QuicErrorCode error_code, const std::string& error_details,
       QuicTimeWaitListManager::TimeWaitAction action);
 
   // Save/Restore per packet context.
diff --git a/quiche/quic/core/quic_epoll_alarm_factory_test.cc b/quiche/quic/core/quic_epoll_alarm_factory_test.cc
index 30fd188..87a6da6 100644
--- a/quiche/quic/core/quic_epoll_alarm_factory_test.cc
+++ b/quiche/quic/core/quic_epoll_alarm_factory_test.cc
@@ -40,8 +40,7 @@
   QuicConnectionArena arena_;
 };
 
-INSTANTIATE_TEST_SUITE_P(UseArena,
-                         QuicEpollAlarmFactoryTest,
+INSTANTIATE_TEST_SUITE_P(UseArena, QuicEpollAlarmFactoryTest,
                          ::testing::ValuesIn({true, false}),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/quic_epoll_connection_helper.cc b/quiche/quic/core/quic_epoll_connection_helper.cc
index 0ccd2c1..1c2f5b7 100644
--- a/quiche/quic/core/quic_epoll_connection_helper.cc
+++ b/quiche/quic/core/quic_epoll_connection_helper.cc
@@ -19,9 +19,7 @@
 
 QuicEpollConnectionHelper::~QuicEpollConnectionHelper() = default;
 
-const QuicClock* QuicEpollConnectionHelper::GetClock() const {
-  return &clock_;
-}
+const QuicClock* QuicEpollConnectionHelper::GetClock() const { return &clock_; }
 
 QuicRandom* QuicEpollConnectionHelper::GetRandomGenerator() {
   return random_generator_;
diff --git a/quiche/quic/core/quic_flow_controller.cc b/quiche/quic/core/quic_flow_controller.cc
index 6b5041d..47d3c28 100644
--- a/quiche/quic/core/quic_flow_controller.cc
+++ b/quiche/quic/core/quic_flow_controller.cc
@@ -29,11 +29,8 @@
 }
 
 QuicFlowController::QuicFlowController(
-    QuicSession* session,
-    QuicStreamId id,
-    bool is_connection_flow_controller,
-    QuicStreamOffset send_window_offset,
-    QuicStreamOffset receive_window_offset,
+    QuicSession* session, QuicStreamId id, bool is_connection_flow_controller,
+    QuicStreamOffset send_window_offset, QuicStreamOffset receive_window_offset,
     QuicByteCount receive_window_size_limit,
     bool should_auto_tune_receive_window,
     QuicFlowControllerInterface* session_flow_controller)
@@ -283,9 +280,7 @@
   UpdateReceiveWindowOffsetAndSendWindowUpdate(available_window);
 }
 
-bool QuicFlowController::IsBlocked() const {
-  return SendWindowSize() == 0;
-}
+bool QuicFlowController::IsBlocked() const { return SendWindowSize() == 0; }
 
 uint64_t QuicFlowController::SendWindowSize() const {
   if (bytes_sent_ > send_window_offset_) {
diff --git a/quiche/quic/core/quic_flow_controller.h b/quiche/quic/core/quic_flow_controller.h
index 69a4e94..7f68ff5 100644
--- a/quiche/quic/core/quic_flow_controller.h
+++ b/quiche/quic/core/quic_flow_controller.h
@@ -37,8 +37,7 @@
 class QUIC_EXPORT_PRIVATE QuicFlowController
     : public QuicFlowControllerInterface {
  public:
-  QuicFlowController(QuicSession* session,
-                     QuicStreamId id,
+  QuicFlowController(QuicSession* session, QuicStreamId id,
                      bool is_connection_flow_controller,
                      QuicStreamOffset send_window_offset,
                      QuicStreamOffset receive_window_offset,
diff --git a/quiche/quic/core/quic_framer.h b/quiche/quic/core/quic_framer.h
index de03169..f60a109 100644
--- a/quiche/quic/core/quic_framer.h
+++ b/quiche/quic/core/quic_framer.h
@@ -268,8 +268,7 @@
   // the list of supported QUIC versions. |quic_version_| is set to the maximum
   // version in |supported_versions|.
   QuicFramer(const ParsedQuicVersionVector& supported_versions,
-             QuicTime creation_time,
-             Perspective perspective,
+             QuicTime creation_time, Perspective perspective,
              uint8_t expected_server_connection_id_length);
   QuicFramer(const QuicFramer&) = delete;
   QuicFramer& operator=(const QuicFramer&) = delete;
@@ -367,8 +366,7 @@
   // Size in bytes of all connection close frame fields, including the error
   // details.
   static size_t GetConnectionCloseFrameSize(
-      QuicTransportVersion version,
-      const QuicConnectionCloseFrame& frame);
+      QuicTransportVersion version, const QuicConnectionCloseFrame& frame);
   // Size in bytes of all GoAway frame fields without the reason phrase.
   static size_t GetMinGoAwayFrameSize();
   // Size in bytes of all WindowUpdate frame fields.
@@ -381,8 +379,7 @@
                                        const QuicMaxStreamsFrame& frame);
   // Size in bytes of all StreamsBlocked frame fields.
   static size_t GetStreamsBlockedFrameSize(
-      QuicTransportVersion version,
-      const QuicStreamsBlockedFrame& frame);
+      QuicTransportVersion version, const QuicStreamsBlockedFrame& frame);
   // Size in bytes of all Blocked frame fields.
   static size_t GetBlockedFrameSize(QuicTransportVersion version,
                                     const QuicBlockedFrame& frame);
@@ -415,8 +412,7 @@
   // Returns the number of bytes added to the packet for the specified frame,
   // and 0 if the frame doesn't fit.  Includes the header size for the first
   // frame.
-  size_t GetSerializedFrameLength(const QuicFrame& frame,
-                                  size_t free_bytes,
+  size_t GetSerializedFrameLength(const QuicFrame& frame, size_t free_bytes,
                                   bool first_frame_in_packet,
                                   bool last_frame_in_packet,
                                   QuicPacketNumberLength packet_number_length);
@@ -424,11 +420,9 @@
   // Returns the associated data from the encrypted packet |encrypted| as a
   // stringpiece.
   static absl::string_view GetAssociatedDataFromEncryptedPacket(
-      QuicTransportVersion version,
-      const QuicEncryptedPacket& encrypted,
+      QuicTransportVersion version, const QuicEncryptedPacket& encrypted,
       QuicConnectionIdLength destination_connection_id_length,
-      QuicConnectionIdLength source_connection_id_length,
-      bool includes_version,
+      QuicConnectionIdLength source_connection_id_length, bool includes_version,
       bool includes_diversification_nonce,
       QuicPacketNumberLength packet_number_length,
       QuicVariableLengthIntegerLength retry_token_length_length,
@@ -439,21 +433,15 @@
   // stores the result in the other parameters.
   // |expected_destination_connection_id_length| is only used for short headers.
   static QuicErrorCode ParsePublicHeader(
-      QuicDataReader* reader,
-      uint8_t expected_destination_connection_id_length,
-      bool ietf_format,
-      uint8_t* first_byte,
-      PacketHeaderFormat* format,
-      bool* version_present,
-      bool* has_length_prefix,
-      QuicVersionLabel* version_label,
-      ParsedQuicVersion* parsed_version,
+      QuicDataReader* reader, uint8_t expected_destination_connection_id_length,
+      bool ietf_format, uint8_t* first_byte, PacketHeaderFormat* format,
+      bool* version_present, bool* has_length_prefix,
+      QuicVersionLabel* version_label, ParsedQuicVersion* parsed_version,
       QuicConnectionId* destination_connection_id,
       QuicConnectionId* source_connection_id,
       QuicLongHeaderType* long_packet_type,
       QuicVariableLengthIntegerLength* retry_token_length_length,
-      absl::string_view* retry_token,
-      std::string* detailed_error);
+      absl::string_view* retry_token, std::string* detailed_error);
 
   // Parses the unencrypted fields in |packet| and stores them in the other
   // parameters. This can only be called on the server.
@@ -473,10 +461,8 @@
   // Returns the length of the packet, which must not be longer than
   // |packet_length|.  Returns 0 if it fails to serialize.
   size_t BuildDataPacket(const QuicPacketHeader& header,
-                         const QuicFrames& frames,
-                         char* buffer,
-                         size_t packet_length,
-                         EncryptionLevel level);
+                         const QuicFrames& frames, char* buffer,
+                         size_t packet_length, EncryptionLevel level);
 
   // Returns a new public reset packet.
   static std::unique_ptr<QuicEncryptedPacket> BuildPublicResetPacket(
@@ -487,22 +473,18 @@
 
   // Returns a new IETF stateless reset packet.
   static std::unique_ptr<QuicEncryptedPacket> BuildIetfStatelessResetPacket(
-      QuicConnectionId connection_id,
-      size_t received_packet_length,
+      QuicConnectionId connection_id, size_t received_packet_length,
       StatelessResetToken stateless_reset_token);
 
   // Returns a new version negotiation packet.
   static std::unique_ptr<QuicEncryptedPacket> BuildVersionNegotiationPacket(
       QuicConnectionId server_connection_id,
-      QuicConnectionId client_connection_id,
-      bool ietf_quic,
-      bool use_length_prefix,
-      const ParsedQuicVersionVector& versions);
+      QuicConnectionId client_connection_id, bool ietf_quic,
+      bool use_length_prefix, const ParsedQuicVersionVector& versions);
 
   // Returns a new IETF version negotiation packet.
   static std::unique_ptr<QuicEncryptedPacket> BuildIetfVersionNegotiationPacket(
-      bool use_length_prefix,
-      QuicConnectionId server_connection_id,
+      bool use_length_prefix, QuicConnectionId server_connection_id,
       QuicConnectionId client_connection_id,
       const ParsedQuicVersionVector& versions);
 
@@ -510,8 +492,7 @@
   // packet will be set -- but it will be set from version_ not
   // header.versions.
   bool AppendPacketHeader(const QuicPacketHeader& header,
-                          QuicDataWriter* writer,
-                          size_t* length_field_offset);
+                          QuicDataWriter* writer, size_t* length_field_offset);
   bool AppendIetfHeaderTypeByte(const QuicPacketHeader& header,
                                 QuicDataWriter* writer);
   bool AppendIetfPacketHeader(const QuicPacketHeader& header,
@@ -521,11 +502,9 @@
                                  QuicDataWriter* writer,
                                  size_t length_field_offset,
                                  EncryptionLevel level);
-  bool AppendTypeByte(const QuicFrame& frame,
-                      bool last_frame_in_packet,
+  bool AppendTypeByte(const QuicFrame& frame, bool last_frame_in_packet,
                       QuicDataWriter* writer);
-  bool AppendIetfFrameType(const QuicFrame& frame,
-                           bool last_frame_in_packet,
+  bool AppendIetfFrameType(const QuicFrame& frame, bool last_frame_in_packet,
                            QuicDataWriter* writer);
   size_t AppendIetfFrames(const QuicFrames& frames, QuicDataWriter* writer);
   bool AppendStreamFrame(const QuicStreamFrame& frame,
@@ -584,19 +563,14 @@
   // Encrypts a payload in |buffer|.  |ad_len| is the length of the associated
   // data. |total_len| is the length of the associated data plus plaintext.
   // |buffer_len| is the full length of the allocated buffer.
-  size_t EncryptInPlace(EncryptionLevel level,
-                        QuicPacketNumber packet_number,
-                        size_t ad_len,
-                        size_t total_len,
-                        size_t buffer_len,
+  size_t EncryptInPlace(EncryptionLevel level, QuicPacketNumber packet_number,
+                        size_t ad_len, size_t total_len, size_t buffer_len,
                         char* buffer);
 
   // Returns the length of the data encrypted into |buffer| if |buffer_len| is
   // long enough, and otherwise 0.
-  size_t EncryptPayload(EncryptionLevel level,
-                        QuicPacketNumber packet_number,
-                        const QuicPacket& packet,
-                        char* buffer,
+  size_t EncryptPayload(EncryptionLevel level, QuicPacketNumber packet_number,
+                        const QuicPacket& packet, char* buffer,
                         size_t buffer_len);
 
   // Returns the length of the ciphertext that would be generated by encrypting
@@ -690,8 +664,7 @@
   // When targeting Google servers, it is recommended to use a
   // |destination_connection_id_length| of 8.
   static bool WriteClientVersionNegotiationProbePacket(
-      char* packet_bytes,
-      QuicByteCount packet_length,
+      char* packet_bytes, QuicByteCount packet_length,
       const char* destination_connection_id_bytes,
       uint8_t destination_connection_id_length);
 
@@ -708,11 +681,9 @@
   // WriteClientVersionNegotiationProbePacket. In the case of a failure,
   // |detailed_error| will be filled in with an explanation of what failed.
   static bool ParseServerVersionNegotiationProbeResponse(
-      const char* packet_bytes,
-      QuicByteCount packet_length,
+      const char* packet_bytes, QuicByteCount packet_length,
       char* source_connection_id_bytes,
-      uint8_t* source_connection_id_length_out,
-      std::string* detailed_error);
+      uint8_t* source_connection_id_length_out, std::string* detailed_error);
 
   void set_local_ack_delay_exponent(uint32_t exponent) {
     local_ack_delay_exponent_ = exponent;
@@ -768,10 +739,8 @@
   // Applies header protection to an IETF QUIC packet header in |buffer| using
   // the encrypter for level |level|. The buffer has |buffer_len| bytes of data,
   // with the first protected packet bytes starting at |ad_len|.
-  bool ApplyHeaderProtection(EncryptionLevel level,
-                             char* buffer,
-                             size_t buffer_len,
-                             size_t ad_len);
+  bool ApplyHeaderProtection(EncryptionLevel level, char* buffer,
+                             size_t buffer_len, size_t ad_len);
 
   // Removes header protection from an IETF QUIC packet header.
   //
@@ -793,17 +762,14 @@
                               uint64_t* full_packet_number,
                               std::vector<char>* associated_data);
 
-  bool ProcessDataPacket(QuicDataReader* reader,
-                         QuicPacketHeader* header,
+  bool ProcessDataPacket(QuicDataReader* reader, QuicPacketHeader* header,
                          const QuicEncryptedPacket& packet,
-                         char* decrypted_buffer,
-                         size_t buffer_length);
+                         char* decrypted_buffer, size_t buffer_length);
 
   bool ProcessIetfDataPacket(QuicDataReader* encrypted_reader,
                              QuicPacketHeader* header,
                              const QuicEncryptedPacket& packet,
-                             char* decrypted_buffer,
-                             size_t buffer_length);
+                             char* decrypted_buffer, size_t buffer_length);
 
   bool ProcessPublicResetPacket(QuicDataReader* reader,
                                 const QuicPacketHeader& header);
@@ -841,14 +807,12 @@
   // to the appropriate length.
   // TODO(b/133873272) refactor this method.
   static bool ProcessAndValidateIetfConnectionIdLength(
-      QuicDataReader* reader,
-      ParsedQuicVersion version,
+      QuicDataReader* reader, ParsedQuicVersion version,
       Perspective perspective,
       bool should_update_expected_server_connection_id_length,
       uint8_t* expected_server_connection_id_length,
       uint8_t* destination_connection_id_length,
-      uint8_t* source_connection_id_length,
-      std::string* detailed_error);
+      uint8_t* source_connection_id_length, std::string* detailed_error);
 
   bool ProcessIetfHeaderTypeByte(QuicDataReader* reader,
                                  QuicPacketHeader* header);
@@ -859,10 +823,8 @@
   // packet number from the truncated one and the last seen packet number, and
   // stores it to |packet_number|.
   bool ProcessAndCalculatePacketNumber(
-      QuicDataReader* reader,
-      QuicPacketNumberLength packet_number_length,
-      QuicPacketNumber base_packet_number,
-      uint64_t* packet_number);
+      QuicDataReader* reader, QuicPacketNumberLength packet_number_length,
+      QuicPacketNumber base_packet_number, uint64_t* packet_number);
   bool ProcessFrameData(QuicDataReader* reader, const QuicPacketHeader& header);
 
   static bool IsIetfFrameTypeExpectedForEncryptionLevel(uint64_t frame_type,
@@ -871,15 +833,13 @@
   bool ProcessIetfFrameData(QuicDataReader* reader,
                             const QuicPacketHeader& header,
                             EncryptionLevel decrypted_level);
-  bool ProcessStreamFrame(QuicDataReader* reader,
-                          uint8_t frame_type,
+  bool ProcessStreamFrame(QuicDataReader* reader, uint8_t frame_type,
                           QuicStreamFrame* frame);
   bool ProcessAckFrame(QuicDataReader* reader, uint8_t frame_type);
   bool ProcessTimestampsInAckFrame(uint8_t num_received_packets,
                                    QuicPacketNumber largest_acked,
                                    QuicDataReader* reader);
-  bool ProcessIetfAckFrame(QuicDataReader* reader,
-                           uint64_t frame_type,
+  bool ProcessIetfAckFrame(QuicDataReader* reader, uint64_t frame_type,
                            QuicAckFrame* ack_frame);
   bool ProcessIetfTimestampsInAckFrame(QuicPacketNumber largest_acked,
                                        QuicDataReader* reader);
@@ -894,25 +854,20 @@
                                 QuicWindowUpdateFrame* frame);
   bool ProcessBlockedFrame(QuicDataReader* reader, QuicBlockedFrame* frame);
   void ProcessPaddingFrame(QuicDataReader* reader, QuicPaddingFrame* frame);
-  bool ProcessMessageFrame(QuicDataReader* reader,
-                           bool no_message_length,
+  bool ProcessMessageFrame(QuicDataReader* reader, bool no_message_length,
                            QuicMessageFrame* frame);
 
-  bool DecryptPayload(size_t udp_packet_length,
-                      absl::string_view encrypted,
+  bool DecryptPayload(size_t udp_packet_length, absl::string_view encrypted,
                       absl::string_view associated_data,
-                      const QuicPacketHeader& header,
-                      char* decrypted_buffer,
-                      size_t buffer_length,
-                      size_t* decrypted_length,
+                      const QuicPacketHeader& header, char* decrypted_buffer,
+                      size_t buffer_length, size_t* decrypted_length,
                       EncryptionLevel* decrypted_level);
 
   // Returns the full packet number from the truncated
   // wire format version and the last seen packet number.
   uint64_t CalculatePacketNumberFromWire(
       QuicPacketNumberLength packet_number_length,
-      QuicPacketNumber base_packet_number,
-      uint64_t packet_number) const;
+      QuicPacketNumber base_packet_number, uint64_t packet_number) const;
 
   // Returns the QuicTime::Delta corresponding to the time from when the framer
   // was created.
@@ -932,26 +887,21 @@
   size_t GetAckFrameSize(const QuicAckFrame& ack);
 
   // Computes the wire size in bytes of the payload of |frame|.
-  size_t ComputeFrameLength(const QuicFrame& frame,
-                            bool last_frame_in_packet,
+  size_t ComputeFrameLength(const QuicFrame& frame, bool last_frame_in_packet,
                             QuicPacketNumberLength packet_number_length);
 
   static bool AppendPacketNumber(QuicPacketNumberLength packet_number_length,
                                  QuicPacketNumber packet_number,
                                  QuicDataWriter* writer);
-  static bool AppendStreamId(size_t stream_id_length,
-                             QuicStreamId stream_id,
+  static bool AppendStreamId(size_t stream_id_length, QuicStreamId stream_id,
                              QuicDataWriter* writer);
-  static bool AppendStreamOffset(size_t offset_length,
-                                 QuicStreamOffset offset,
+  static bool AppendStreamOffset(size_t offset_length, QuicStreamOffset offset,
                                  QuicDataWriter* writer);
 
   // Appends a single ACK block to |writer| and returns true if the block was
   // successfully appended.
-  static bool AppendAckBlock(uint8_t gap,
-                             QuicPacketNumberLength length_length,
-                             uint64_t length,
-                             QuicDataWriter* writer);
+  static bool AppendAckBlock(uint8_t gap, QuicPacketNumberLength length_length,
+                             uint64_t length, QuicDataWriter* writer);
 
   static uint8_t GetPacketNumberFlags(
       QuicPacketNumberLength packet_number_length);
@@ -959,14 +909,10 @@
   static AckFrameInfo GetAckFrameInfo(const QuicAckFrame& frame);
 
   static QuicErrorCode ParsePublicHeaderGoogleQuic(
-      QuicDataReader* reader,
-      uint8_t* first_byte,
-      PacketHeaderFormat* format,
-      bool* version_present,
-      QuicVersionLabel* version_label,
+      QuicDataReader* reader, uint8_t* first_byte, PacketHeaderFormat* format,
+      bool* version_present, QuicVersionLabel* version_label,
       ParsedQuicVersion* parsed_version,
-      QuicConnectionId* destination_connection_id,
-      std::string* detailed_error);
+      QuicConnectionId* destination_connection_id, std::string* detailed_error);
 
   bool ValidateReceivedConnectionIds(const QuicPacketHeader& header);
 
@@ -1006,8 +952,7 @@
                                      QuicDataWriter* writer);
 
   // IETF frame processing methods.
-  bool ProcessIetfStreamFrame(QuicDataReader* reader,
-                              uint8_t frame_type,
+  bool ProcessIetfStreamFrame(QuicDataReader* reader, uint8_t frame_type,
                               QuicStreamFrame* frame);
   bool ProcessIetfConnectionCloseFrame(QuicDataReader* reader,
                                        QuicConnectionCloseType type,
@@ -1027,8 +972,7 @@
                                 QuicAckFrequencyFrame* frame);
   // IETF frame appending methods.  All methods append the type byte as well.
   bool AppendIetfStreamFrame(const QuicStreamFrame& frame,
-                             bool last_frame_in_packet,
-                             QuicDataWriter* writer);
+                             bool last_frame_in_packet, QuicDataWriter* writer);
   bool AppendIetfConnectionCloseFrame(const QuicConnectionCloseFrame& frame,
                                       QuicDataWriter* writer);
   bool AppendPathChallengeFrame(const QuicPathChallengeFrame& frame,
@@ -1053,8 +997,7 @@
   bool AppendMaxStreamsFrame(const QuicMaxStreamsFrame& frame,
                              QuicDataWriter* writer);
   bool ProcessMaxStreamsFrame(QuicDataReader* reader,
-                              QuicMaxStreamsFrame* frame,
-                              uint64_t frame_type);
+                              QuicMaxStreamsFrame* frame, uint64_t frame_type);
 
   bool AppendDataBlockedFrame(const QuicBlockedFrame& frame,
                               QuicDataWriter* writer);
@@ -1102,8 +1045,7 @@
   void set_detailed_error(std::string error) { detailed_error_ = error; }
 
   // Returns false if the reading fails.
-  bool ReadUint32FromVarint62(QuicDataReader* reader,
-                              QuicIetfFrameType type,
+  bool ReadUint32FromVarint62(QuicDataReader* reader, QuicIetfFrameType type,
                               QuicStreamId* id);
 
   bool ProcessPacketInternal(const QuicEncryptedPacket& packet);
diff --git a/quiche/quic/core/quic_idle_network_detector.cc b/quiche/quic/core/quic_idle_network_detector.cc
index 77d6dba..edb5483 100644
--- a/quiche/quic/core/quic_idle_network_detector.cc
+++ b/quiche/quic/core/quic_idle_network_detector.cc
@@ -57,8 +57,7 @@
 }
 
 void QuicIdleNetworkDetector::SetTimeouts(
-    QuicTime::Delta handshake_timeout,
-    QuicTime::Delta idle_network_timeout) {
+    QuicTime::Delta handshake_timeout, QuicTime::Delta idle_network_timeout) {
   handshake_timeout_ = handshake_timeout;
   idle_network_timeout_ = idle_network_timeout;
 
diff --git a/quiche/quic/core/quic_interval.h b/quiche/quic/core/quic_interval.h
index 040355f..e291c53 100644
--- a/quiche/quic/core/quic_interval.h
+++ b/quiche/quic/core/quic_interval.h
@@ -57,6 +57,7 @@
 //   EXPECT_FALSE(r1.Contains(r1.min()));  // e.g. doesn't contain its own min.
 
 #include <stddef.h>
+
 #include <algorithm>
 #include <ostream>
 #include <type_traits>
@@ -97,8 +98,7 @@
   // QuicInterval.
   QuicInterval(const T& min, const T& max) : min_(min), max_(max) {}
 
-  template <typename U1,
-            typename U2,
+  template <typename U1, typename U2,
             typename = typename std::enable_if<
                 std::is_convertible<U1, T>::value &&
                 std::is_convertible<U2, T>::value>::type>
@@ -157,8 +157,7 @@
   // Roughly speaking that means the intervals don't intersect, and they are not
   // adjacent.   Empty intervals are always separated from any other interval.
   bool Separated(const QuicInterval& other) const {
-    if (Empty() || other.Empty())
-      return true;
+    if (Empty() || other.Empty()) return true;
     return other.max() < min() || max() < other.min();
   }
 
@@ -191,17 +190,14 @@
   // be set to the empty QuicInterval (it is possible that *lo will be empty and
   // *hi non-empty). The method returns true iff the intersection of *this and i
   // is non-empty.
-  bool Difference(const QuicInterval& i,
-                  QuicInterval* lo,
+  bool Difference(const QuicInterval& i, QuicInterval* lo,
                   QuicInterval* hi) const;
 
   friend bool operator==(const QuicInterval& a, const QuicInterval& b) {
     bool ae = a.Empty();
     bool be = b.Empty();
-    if (ae && be)
-      return true;  // All empties are equal.
-    if (ae != be)
-      return false;  // Empty cannot equal nonempty.
+    if (ae && be) return true;   // All empties are equal.
+    if (ae != be) return false;  // Empty cannot equal nonempty.
     return a.min() == b.min() && a.max() == b.max();
   }
 
@@ -248,8 +244,7 @@
 template <typename T>
 bool QuicInterval<T>::Intersects(const QuicInterval& i,
                                  QuicInterval* out) const {
-  if (!Intersects(i))
-    return false;
+  if (!Intersects(i)) return false;
   if (out != nullptr) {
     *out = QuicInterval(std::max(min(), i.min()), std::min(max(), i.max()));
   }
@@ -258,8 +253,7 @@
 
 template <typename T>
 bool QuicInterval<T>::IntersectWith(const QuicInterval& i) {
-  if (Empty())
-    return false;
+  if (Empty()) return false;
   bool modified = false;
   if (i.min() > min()) {
     SetMin(i.min());
@@ -274,8 +268,7 @@
 
 template <typename T>
 bool QuicInterval<T>::SpanningUnion(const QuicInterval& i) {
-  if (i.Empty())
-    return false;
+  if (i.Empty()) return false;
   if (Empty()) {
     *this = i;
     return true;
@@ -340,14 +333,12 @@
 }
 
 template <typename T>
-bool QuicInterval<T>::Difference(const QuicInterval& i,
-                                 QuicInterval* lo,
+bool QuicInterval<T>::Difference(const QuicInterval& i, QuicInterval* lo,
                                  QuicInterval* hi) const {
   // Initialize *lo and *hi to empty
   *lo = {};
   *hi = {};
-  if (Empty())
-    return false;
+  if (Empty()) return false;
   if (i.Empty()) {
     *lo = *this;
     return false;
diff --git a/quiche/quic/core/quic_interval_deque.h b/quiche/quic/core/quic_interval_deque.h
index f4bf092..eff9f63 100644
--- a/quiche/quic/core/quic_interval_deque.h
+++ b/quiche/quic/core/quic_interval_deque.h
@@ -253,8 +253,7 @@
   void PushBackUniversal(U&& item);
 
   Iterator Search(const std::size_t interval_begin,
-                  const std::size_t begin_index,
-                  const std::size_t end_index);
+                  const std::size_t begin_index, const std::size_t end_index);
 
   // For accessing the |cached_index_|
   friend class test::QuicIntervalDequePeer;
@@ -374,8 +373,7 @@
 
 template <class T, class C>
 typename QuicIntervalDeque<T, C>::Iterator QuicIntervalDeque<T, C>::Search(
-    const std::size_t interval_begin,
-    const std::size_t begin_index,
+    const std::size_t interval_begin, const std::size_t begin_index,
     const std::size_t end_index) {
   auto begin = container_.begin() + begin_index;
   auto end = container_.begin() + end_index;
diff --git a/quiche/quic/core/quic_interval_deque_test.cc b/quiche/quic/core/quic_interval_deque_test.cc
index 8a1f028..318059f 100644
--- a/quiche/quic/core/quic_interval_deque_test.cc
+++ b/quiche/quic/core/quic_interval_deque_test.cc
@@ -3,8 +3,10 @@
 // found in the LICENSE file.
 
 #include "quiche/quic/core/quic_interval_deque.h"
+
 #include <cstdint>
 #include <ostream>
+
 #include "quiche/quic/core/quic_interval.h"
 #include "quiche/quic/platform/api/quic_expect_bug.h"
 #include "quiche/quic/platform/api/quic_test.h"
@@ -26,8 +28,7 @@
   QuicInterval<std::size_t> interval() const {
     return QuicInterval<std::size_t>(interval_start, interval_end);
   }
-  TestIntervalItem(int32_t val,
-                   std::size_t interval_start,
+  TestIntervalItem(int32_t val, std::size_t interval_start,
                    std::size_t interval_end)
       : val(val), interval_start(interval_start), interval_end(interval_end) {}
 };
diff --git a/quiche/quic/core/quic_interval_set.h b/quiche/quic/core/quic_interval_set.h
index e97efed..7e2b11b 100644
--- a/quiche/quic/core/quic_interval_set.h
+++ b/quiche/quic/core/quic_interval_set.h
@@ -51,14 +51,14 @@
 //   EXPECT_TRUE(intervals.Contains(Interval<int>(20, 40)));
 
 #include <stddef.h>
+
 #include <algorithm>
 #include <initializer_list>
 #include <set>
+#include <string>
 #include <utility>
 #include <vector>
 
-#include <string>
-
 #include "quiche/quic/core/quic_interval.h"
 #include "quiche/quic/platform/api/quic_containers.h"
 #include "quiche/quic/platform/api/quic_logging.h"
@@ -353,8 +353,7 @@
   template <typename Iter>
   void assign(Iter first, Iter last) {
     Clear();
-    for (; first != last; ++first)
-      Add(*first);
+    for (; first != last; ++first) Add(*first);
   }
 
   void assign(std::initializer_list<value_type> il) {
@@ -414,8 +413,7 @@
   // first element in 'x' after the hole, or x->intervals_.end() if no elements
   // exist after the hole.
   template <typename X, typename Func>
-  static bool FindNextIntersectingPairImpl(X* x,
-                                           const QuicIntervalSet& y,
+  static bool FindNextIntersectingPairImpl(X* x, const QuicIntervalSet& y,
                                            const_iterator* mine,
                                            const_iterator* theirs,
                                            Func on_hole);
@@ -477,8 +475,7 @@
 
 template <typename T>
 void QuicIntervalSet<T>::Add(const value_type& interval) {
-  if (interval.Empty())
-    return;
+  if (interval.Empty()) return;
   const_iterator it = intervals_.lower_bound(interval.min());
   value_type the_union = interval;
   if (it != intervals_.begin()) {
@@ -504,8 +501,7 @@
 bool QuicIntervalSet<T>::Contains(const T& value) const {
   // Find the first interval with min() > value, then move back one step
   const_iterator it = intervals_.upper_bound(value);
-  if (it == intervals_.begin())
-    return false;
+  if (it == intervals_.begin()) return false;
   --it;
   return it->Contains(value);
 }
@@ -514,8 +510,7 @@
 bool QuicIntervalSet<T>::Contains(const value_type& interval) const {
   // Find the first interval with min() > value, then move back one step.
   const_iterator it = intervals_.upper_bound(interval.min());
-  if (it == intervals_.begin())
-    return false;
+  if (it == intervals_.begin()) return false;
   --it;
   return it->Contains(interval);
 }
@@ -554,8 +549,7 @@
 typename QuicIntervalSet<T>::const_iterator QuicIntervalSet<T>::Find(
     const T& value) const {
   const_iterator it = intervals_.upper_bound(value);
-  if (it == intervals_.begin())
-    return intervals_.end();
+  if (it == intervals_.begin()) return intervals_.end();
   --it;
   if (it->Contains(value))
     return it;
@@ -573,8 +567,7 @@
 typename QuicIntervalSet<T>::const_iterator QuicIntervalSet<T>::Find(
     const value_type& probe) const {
   const_iterator it = intervals_.upper_bound(probe.min());
-  if (it == intervals_.begin())
-    return intervals_.end();
+  if (it == intervals_.begin()) return intervals_.end();
   --it;
   if (it->Contains(probe))
     return it;
@@ -609,14 +602,11 @@
 
 template <typename T>
 bool QuicIntervalSet<T>::IsDisjoint(const value_type& interval) const {
-  if (interval.Empty())
-    return true;
+  if (interval.Empty()) return true;
   // Find the first interval with min() > interval.min()
   const_iterator it = intervals_.upper_bound(interval.min());
-  if (it != intervals_.end() && interval.max() > it->min())
-    return false;
-  if (it == intervals_.begin())
-    return true;
+  if (it != intervals_.end() && interval.max() > it->min()) return false;
+  if (it == intervals_.begin()) return true;
   --it;
   return it->max() <= interval.min();
 }
@@ -769,8 +759,7 @@
   // We look at all the elements of intervals_, so that's O(Size()).
   //
   // We also look at all the elements of other.intervals_, for O(other.Size()).
-  if (Empty())
-    return;
+  if (Empty()) return;
   Set result;
   const_iterator mine = intervals_.begin();
   value_type myinterval = *mine;
@@ -839,11 +828,9 @@
   const_iterator prev = end();
   for (const_iterator it = begin(); it != end(); ++it) {
     // invalid or empty interval.
-    if (it->min() >= it->max())
-      return false;
+    if (it->min() >= it->max()) return false;
     // Not sorted, not disjoint, or adjacent.
-    if (prev != end() && prev->max() >= it->min())
-      return false;
+    if (prev != end() && prev->max() >= it->min()) return false;
     prev = it;
   }
   return true;
diff --git a/quiche/quic/core/quic_interval_set_test.cc b/quiche/quic/core/quic_interval_set_test.cc
index fca037d..b3ac3e6 100644
--- a/quiche/quic/core/quic_interval_set_test.cc
+++ b/quiche/quic/core/quic_interval_set_test.cc
@@ -132,8 +132,7 @@
   EXPECT_TRUE(it->Contains(value)) << "Iterator does not contain " << value;
 }
 
-static void TestContainsAndFind(const QuicIntervalSet<int>& is,
-                                int min,
+static void TestContainsAndFind(const QuicIntervalSet<int>& is, int min,
                                 int max) {
   EXPECT_TRUE(is.Contains(min, max))
       << "Set does not contain interval with min " << min << "and max " << max;
@@ -152,8 +151,7 @@
                           << value;
 }
 
-static void TestNotContainsAndFind(const QuicIntervalSet<int>& is,
-                                   int min,
+static void TestNotContainsAndFind(const QuicIntervalSet<int>& is, int min,
                                    int max) {
   EXPECT_FALSE(is.Contains(min, max))
       << "Set contains interval with min " << min << "and max " << max;
@@ -854,12 +852,8 @@
 
 // Helper method for testing and verifying the results of a one-interval
 // completement case.
-static bool CheckOneComplement(int add_min,
-                               int add_max,
-                               int comp_min,
-                               int comp_max,
-                               int count,
-                               ...) {
+static bool CheckOneComplement(int add_min, int add_max, int comp_min,
+                               int comp_max, int count, ...) {
   QuicIntervalSet<int> iset;
   iset.Add(add_min, add_max);
   iset.Complement(comp_min, comp_max);
@@ -906,11 +900,8 @@
 
 // Helper method that copies <iset> and takes its complement,
 // returning false if Check succeeds.
-static bool CheckComplement(const QuicIntervalSet<int>& iset,
-                            int comp_min,
-                            int comp_max,
-                            int count,
-                            ...) {
+static bool CheckComplement(const QuicIntervalSet<int>& iset, int comp_min,
+                            int comp_max, int count, ...) {
   QuicIntervalSet<int> iset_copy = iset;
   iset_copy.Complement(comp_min, comp_max);
   bool result = true;
diff --git a/quiche/quic/core/quic_interval_test.cc b/quiche/quic/core/quic_interval_test.cc
index 6848472..9a7c70d 100644
--- a/quiche/quic/core/quic_interval_test.cc
+++ b/quiche/quic/core/quic_interval_test.cc
@@ -27,8 +27,7 @@
 
 template <typename T>
 void STLDeleteElements(T* container) {
-  if (!container)
-    return;
+  if (!container) return;
   STLDeleteContainerPointers(container->begin(), container->end());
   container->clear();
 }
@@ -102,10 +101,8 @@
   // changes_i1 is true, and the same for changes_i2.  The resulting
   // intersection should be result.
   void TestIntersect(const QuicInterval<int64_t>& i1,
-                     const QuicInterval<int64_t>& i2,
-                     bool changes_i1,
-                     bool changes_i2,
-                     const QuicInterval<int64_t>& result) {
+                     const QuicInterval<int64_t>& i2, bool changes_i1,
+                     bool changes_i2, const QuicInterval<int64_t>& result) {
     QuicInterval<int64_t> i;
     i = i1;
     EXPECT_TRUE(i.IntersectWith(i2) == changes_i1 && i == result);
diff --git a/quiche/quic/core/quic_legacy_version_encapsulator.cc b/quiche/quic/core/quic_legacy_version_encapsulator.cc
index 826a101..d2c6082 100644
--- a/quiche/quic/core/quic_legacy_version_encapsulator.cc
+++ b/quiche/quic/core/quic_legacy_version_encapsulator.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "quiche/quic/core/quic_legacy_version_encapsulator.h"
+
 #include "quiche/quic/core/crypto/crypto_handshake_message.h"
 #include "quiche/quic/core/crypto/crypto_protocol.h"
 #include "quiche/quic/core/quic_utils.h"
@@ -57,16 +58,14 @@
 }
 
 void QuicLegacyVersionEncapsulator::OnUnrecoverableError(
-    QuicErrorCode error,
-    const std::string& error_details) {
+    QuicErrorCode error, const std::string& error_details) {
   unrecoverable_failure_encountered_ = true;
   QUIC_BUG(quic_bug_10615_3) << "QuicLegacyVersionEncapsulator received error "
                              << error << ": " << error_details;
 }
 
 bool QuicLegacyVersionEncapsulator::ShouldGeneratePacket(
-    HasRetransmittableData /*retransmittable*/,
-    IsHandshake /*handshake*/) {
+    HasRetransmittableData /*retransmittable*/, IsHandshake /*handshake*/) {
   return true;
 }
 
@@ -77,19 +76,15 @@
 }
 
 SerializedPacketFate QuicLegacyVersionEncapsulator::GetSerializedPacketFate(
-    bool /*is_mtu_discovery*/,
-    EncryptionLevel /*encryption_level*/) {
+    bool /*is_mtu_discovery*/, EncryptionLevel /*encryption_level*/) {
   return SEND_TO_WRITER;
 }
 
 // static
 QuicPacketLength QuicLegacyVersionEncapsulator::Encapsulate(
-    absl::string_view sni,
-    absl::string_view inner_packet,
-    const QuicConnectionId& server_connection_id,
-    QuicTime creation_time,
-    QuicByteCount outer_max_packet_length,
-    char* out) {
+    absl::string_view sni, absl::string_view inner_packet,
+    const QuicConnectionId& server_connection_id, QuicTime creation_time,
+    QuicByteCount outer_max_packet_length, char* out) {
   if (outer_max_packet_length > kMaxOutgoingPacketSize) {
     outer_max_packet_length = kMaxOutgoingPacketSize;
   }
diff --git a/quiche/quic/core/quic_legacy_version_encapsulator.h b/quiche/quic/core/quic_legacy_version_encapsulator.h
index fb2db98..bc96725 100644
--- a/quiche/quic/core/quic_legacy_version_encapsulator.h
+++ b/quiche/quic/core/quic_legacy_version_encapsulator.h
@@ -27,12 +27,9 @@
   // the contents of the encapsulated packet to |out|. |out| must point to a
   // valid memory buffer capable of holding kMaxOutgoingPacketSize bytes.
   static QuicPacketLength Encapsulate(
-      absl::string_view sni,
-      absl::string_view inner_packet,
-      const QuicConnectionId& server_connection_id,
-      QuicTime creation_time,
-      QuicByteCount outer_max_packet_length,
-      char* out);
+      absl::string_view sni, absl::string_view inner_packet,
+      const QuicConnectionId& server_connection_id, QuicTime creation_time,
+      QuicByteCount outer_max_packet_length, char* out);
 
   // Returns the number of bytes of minimum overhead caused by Legacy Version
   // Encapsulation, based on the length of the provided server name |sni|.
@@ -48,8 +45,7 @@
                             IsHandshake handshake) override;
   const QuicFrames MaybeBundleAckOpportunistically() override;
   SerializedPacketFate GetSerializedPacketFate(
-      bool is_mtu_discovery,
-      EncryptionLevel encryption_level) override;
+      bool is_mtu_discovery, EncryptionLevel encryption_level) override;
 
   ~QuicLegacyVersionEncapsulator() override;
 
diff --git a/quiche/quic/core/quic_linux_socket_utils.cc b/quiche/quic/core/quic_linux_socket_utils.cc
index c28cf21..ba3541e 100644
--- a/quiche/quic/core/quic_linux_socket_utils.cc
+++ b/quiche/quic/core/quic_linux_socket_utils.cc
@@ -6,6 +6,7 @@
 
 #include <linux/net_tstamp.h>
 #include <netinet/in.h>
+
 #include <cstdint>
 
 #include "quiche/quic/core/quic_syscall_wrapper.h"
@@ -15,10 +16,8 @@
 
 namespace quic {
 
-QuicMsgHdr::QuicMsgHdr(const char* buffer,
-                       size_t buf_len,
-                       const QuicSocketAddress& peer_address,
-                       char* cbuf,
+QuicMsgHdr::QuicMsgHdr(const char* buffer, size_t buf_len,
+                       const QuicSocketAddress& peer_address, char* cbuf,
                        size_t cbuf_size)
     : iov_{const_cast<char*>(buffer), buf_len},
       cbuf_(cbuf),
@@ -55,8 +54,7 @@
   }
 }
 
-void* QuicMsgHdr::GetNextCmsgDataInternal(int cmsg_level,
-                                          int cmsg_type,
+void* QuicMsgHdr::GetNextCmsgDataInternal(int cmsg_level, int cmsg_type,
                                           size_t data_size) {
   // msg_controllen needs to be increased first, otherwise CMSG_NXTHDR will
   // return nullptr.
@@ -120,9 +118,7 @@
   }
 }
 
-void* QuicMMsgHdr::GetNextCmsgDataInternal(int i,
-                                           int cmsg_level,
-                                           int cmsg_type,
+void* QuicMMsgHdr::GetNextCmsgDataInternal(int i, int cmsg_level, int cmsg_type,
                                            size_t data_size) {
   mmsghdr* mhdr = GetMMsgHdr(i);
   msghdr* hdr = &mhdr->msg_hdr;
@@ -217,8 +213,7 @@
 
 // static
 void QuicLinuxSocketUtils::SetIpInfoInCmsgData(
-    const QuicIpAddress& self_address,
-    void* cmsg_data) {
+    const QuicIpAddress& self_address, void* cmsg_data) {
   QUICHE_DCHECK(self_address.IsInitialized());
   const std::string& address_str = self_address.ToPackedString();
   if (self_address.IsIPv4()) {
diff --git a/quiche/quic/core/quic_linux_socket_utils.h b/quiche/quic/core/quic_linux_socket_utils.h
index f675f19..de80dfd 100644
--- a/quiche/quic/core/quic_linux_socket_utils.h
+++ b/quiche/quic/core/quic_linux_socket_utils.h
@@ -10,6 +10,7 @@
 #include <string.h>
 #include <sys/socket.h>
 #include <sys/uio.h>
+
 #include <deque>
 #include <functional>
 #include <iterator>
@@ -73,10 +74,8 @@
 //   QuicLinuxSocketUtils::WritePacket(fd, hdr);
 class QUIC_EXPORT_PRIVATE QuicMsgHdr {
  public:
-  QuicMsgHdr(const char* buffer,
-             size_t buf_len,
-             const QuicSocketAddress& peer_address,
-             char* cbuf,
+  QuicMsgHdr(const char* buffer, size_t buf_len,
+             const QuicSocketAddress& peer_address, char* cbuf,
              size_t cbuf_size);
 
   // Set IP info in the next cmsg. Both IPv4 and IPv6 are supported.
@@ -91,8 +90,7 @@
   const msghdr* hdr() const { return &hdr_; }
 
  protected:
-  void* GetNextCmsgDataInternal(int cmsg_level,
-                                int cmsg_type,
+  void* GetNextCmsgDataInternal(int cmsg_level, int cmsg_type,
                                 size_t data_size);
 
   msghdr hdr_;
@@ -106,19 +104,14 @@
 
 // BufferedWrite holds all information needed to send a packet.
 struct QUIC_EXPORT_PRIVATE BufferedWrite {
-  BufferedWrite(const char* buffer,
-                size_t buf_len,
+  BufferedWrite(const char* buffer, size_t buf_len,
                 const QuicIpAddress& self_address,
                 const QuicSocketAddress& peer_address)
-      : BufferedWrite(buffer,
-                      buf_len,
-                      self_address,
-                      peer_address,
+      : BufferedWrite(buffer, buf_len, self_address, peer_address,
                       std::unique_ptr<PerPacketOptions>(),
                       /*release_time=*/0) {}
 
-  BufferedWrite(const char* buffer,
-                size_t buf_len,
+  BufferedWrite(const char* buffer, size_t buf_len,
                 const QuicIpAddress& self_address,
                 const QuicSocketAddress& peer_address,
                 std::unique_ptr<PerPacketOptions> options,
@@ -161,12 +154,10 @@
 //   QuicSocketUtils::WriteMultiplePackets(fd, &mhdr, &num_packets_sent);
 class QUIC_EXPORT_PRIVATE QuicMMsgHdr {
  public:
-  using ControlBufferInitializer = std::function<
-      void(QuicMMsgHdr* mhdr, int i, const BufferedWrite& buffered_write)>;
+  using ControlBufferInitializer = std::function<void(
+      QuicMMsgHdr* mhdr, int i, const BufferedWrite& buffered_write)>;
   template <typename IteratorT>
-  QuicMMsgHdr(const IteratorT& first,
-              const IteratorT& last,
-              size_t cbuf_size,
+  QuicMMsgHdr(const IteratorT& first, const IteratorT& last, size_t cbuf_size,
               ControlBufferInitializer cbuf_initializer)
       : num_msgs_(std::distance(first, last)), cbuf_size_(cbuf_size) {
     static_assert(
@@ -211,9 +202,7 @@
  protected:
   void InitOneHeader(int i, const BufferedWrite& buffered_write);
 
-  void* GetNextCmsgDataInternal(int i,
-                                int cmsg_level,
-                                int cmsg_type,
+  void* GetNextCmsgDataInternal(int i, int cmsg_level, int cmsg_type,
                                 size_t data_size);
 
   size_t StorageSize() const {
@@ -287,8 +276,7 @@
   static WriteResult WritePacket(int fd, const QuicMsgHdr& hdr);
 
   // Writes the packets in |mhdr| to the socket, using ::sendmmsg if available.
-  static WriteResult WriteMultiplePackets(int fd,
-                                          QuicMMsgHdr* mhdr,
+  static WriteResult WriteMultiplePackets(int fd, QuicMMsgHdr* mhdr,
                                           int* num_packets_sent);
 };
 
diff --git a/quiche/quic/core/quic_linux_socket_utils_test.cc b/quiche/quic/core/quic_linux_socket_utils_test.cc
index 5ae2fde..e9d1b14 100644
--- a/quiche/quic/core/quic_linux_socket_utils_test.cc
+++ b/quiche/quic/core/quic_linux_socket_utils_test.cc
@@ -6,11 +6,11 @@
 
 #include <netinet/in.h>
 #include <stdint.h>
+
 #include <cstddef>
 #include <sstream>
-#include <vector>
-
 #include <string>
+#include <vector>
 
 #include "quiche/quic/platform/api/quic_test.h"
 #include "quiche/quic/test_tools/quic_mock_syscall_wrapper.h"
@@ -46,10 +46,8 @@
   ScopedGlobalSyscallWrapperOverride syscall_override_{&mock_syscalls_};
 };
 
-void CheckIpAndTtlInCbuf(msghdr* hdr,
-                         const void* cbuf,
-                         const QuicIpAddress& self_addr,
-                         int ttl) {
+void CheckIpAndTtlInCbuf(msghdr* hdr, const void* cbuf,
+                         const QuicIpAddress& self_addr, int ttl) {
   const bool is_ipv4 = self_addr.IsIPv4();
   const size_t ip_cmsg_space = is_ipv4 ? kCmsgSpaceForIpv4 : kCmsgSpaceForIpv6;
 
@@ -82,8 +80,7 @@
   EXPECT_EQ(nullptr, CMSG_NXTHDR(hdr, cmsg));
 }
 
-void CheckMsghdrWithoutCbuf(const msghdr* hdr,
-                            const void* buffer,
+void CheckMsghdrWithoutCbuf(const msghdr* hdr, const void* buffer,
                             size_t buf_len,
                             const QuicSocketAddress& peer_addr) {
   EXPECT_EQ(
@@ -99,8 +96,7 @@
   EXPECT_EQ(0u, hdr->msg_controllen);
 }
 
-void CheckIpAndGsoSizeInCbuf(msghdr* hdr,
-                             const void* cbuf,
+void CheckIpAndGsoSizeInCbuf(msghdr* hdr, const void* cbuf,
                              const QuicIpAddress& self_addr,
                              uint16_t gso_size) {
   const bool is_ipv4 = self_addr.IsIPv4();
@@ -289,25 +285,24 @@
     SCOPED_TRACE(testing::Message()
                  << "expected_num_packets_sent=" << expected_num_packets_sent);
     EXPECT_CALL(mock_syscalls_, Sendmmsg(_, _, _, _))
-        .WillOnce(Invoke(
-            [&](int /*fd*/, mmsghdr* msgvec, unsigned int vlen, int /*flags*/) {
-              EXPECT_LE(static_cast<unsigned int>(expected_num_packets_sent),
-                        vlen);
-              for (unsigned int i = 0; i < vlen; ++i) {
-                const BufferedWrite& buffered_write = buffered_writes[i];
-                const msghdr& hdr = msgvec[i].msg_hdr;
-                EXPECT_EQ(1u, hdr.msg_iovlen);
-                EXPECT_EQ(buffered_write.buffer, hdr.msg_iov->iov_base);
-                EXPECT_EQ(buffered_write.buf_len, hdr.msg_iov->iov_len);
-                sockaddr_storage expected_peer_address =
-                    buffered_write.peer_address.generic_address();
-                EXPECT_EQ(0, memcmp(&expected_peer_address, hdr.msg_name,
-                                    sizeof(sockaddr_storage)));
-                EXPECT_EQ(buffered_write.self_address.IsInitialized(),
-                          hdr.msg_control != nullptr);
-              }
-              return expected_num_packets_sent;
-            }))
+        .WillOnce(Invoke([&](int /*fd*/, mmsghdr* msgvec, unsigned int vlen,
+                             int /*flags*/) {
+          EXPECT_LE(static_cast<unsigned int>(expected_num_packets_sent), vlen);
+          for (unsigned int i = 0; i < vlen; ++i) {
+            const BufferedWrite& buffered_write = buffered_writes[i];
+            const msghdr& hdr = msgvec[i].msg_hdr;
+            EXPECT_EQ(1u, hdr.msg_iovlen);
+            EXPECT_EQ(buffered_write.buffer, hdr.msg_iov->iov_base);
+            EXPECT_EQ(buffered_write.buf_len, hdr.msg_iov->iov_len);
+            sockaddr_storage expected_peer_address =
+                buffered_write.peer_address.generic_address();
+            EXPECT_EQ(0, memcmp(&expected_peer_address, hdr.msg_name,
+                                sizeof(sockaddr_storage)));
+            EXPECT_EQ(buffered_write.self_address.IsInitialized(),
+                      hdr.msg_control != nullptr);
+          }
+          return expected_num_packets_sent;
+        }))
         .RetiresOnSaturation();
 
     int expected_bytes_written = 0;
diff --git a/quiche/quic/core/quic_mtu_discovery.cc b/quiche/quic/core/quic_mtu_discovery.cc
index 95080f7..3732393 100644
--- a/quiche/quic/core/quic_mtu_discovery.cc
+++ b/quiche/quic/core/quic_mtu_discovery.cc
@@ -3,20 +3,19 @@
 // found in the LICENSE file.
 
 #include "quiche/quic/core/quic_mtu_discovery.h"
+
 #include "quiche/quic/platform/api/quic_flag_utils.h"
 #include "quiche/quic/platform/api/quic_stack_trace.h"
 
 namespace quic {
 
 QuicConnectionMtuDiscoverer::QuicConnectionMtuDiscoverer(
-    QuicPacketCount packets_between_probes_base,
-    QuicPacketNumber next_probe_at)
+    QuicPacketCount packets_between_probes_base, QuicPacketNumber next_probe_at)
     : packets_between_probes_(packets_between_probes_base),
       next_probe_at_(next_probe_at) {}
 
 void QuicConnectionMtuDiscoverer::Enable(
-    QuicByteCount max_packet_length,
-    QuicByteCount target_max_packet_length) {
+    QuicByteCount max_packet_length, QuicByteCount target_max_packet_length) {
   QUICHE_DCHECK(!IsEnabled());
 
   if (target_max_packet_length <= max_packet_length) {
@@ -115,8 +114,7 @@
 }
 
 void QuicConnectionMtuDiscoverer::OnMaxPacketLengthUpdated(
-    QuicByteCount old_value,
-    QuicByteCount new_value) {
+    QuicByteCount old_value, QuicByteCount new_value) {
   if (!IsEnabled() || new_value <= old_value) {
     return;
   }
diff --git a/quiche/quic/core/quic_mtu_discovery.h b/quiche/quic/core/quic_mtu_discovery.h
index 6175d6d..c44894f 100644
--- a/quiche/quic/core/quic_mtu_discovery.h
+++ b/quiche/quic/core/quic_mtu_discovery.h
@@ -89,8 +89,7 @@
   QuicPacketNumber next_probe_at() const { return next_probe_at_; }
 
   QUIC_EXPORT_PRIVATE friend std::ostream& operator<<(
-      std::ostream& os,
-      const QuicConnectionMtuDiscoverer& d);
+      std::ostream& os, const QuicConnectionMtuDiscoverer& d);
 
  private:
   bool IsEnabled() const;
diff --git a/quiche/quic/core/quic_network_blackhole_detector.cc b/quiche/quic/core/quic_network_blackhole_detector.cc
index da9262a..4ded8bd 100644
--- a/quiche/quic/core/quic_network_blackhole_detector.cc
+++ b/quiche/quic/core/quic_network_blackhole_detector.cc
@@ -76,8 +76,7 @@
 }
 
 void QuicNetworkBlackholeDetector::RestartDetection(
-    QuicTime path_degrading_deadline,
-    QuicTime blackhole_deadline,
+    QuicTime path_degrading_deadline, QuicTime blackhole_deadline,
     QuicTime path_mtu_reduction_deadline) {
   path_degrading_deadline_ = path_degrading_deadline;
   blackhole_deadline_ = blackhole_deadline;
diff --git a/quiche/quic/core/quic_packet_creator.cc b/quiche/quic/core/quic_packet_creator.cc
index 988717c..c84556c 100644
--- a/quiche/quic/core/quic_packet_creator.cc
+++ b/quiche/quic/core/quic_packet_creator.cc
@@ -104,9 +104,7 @@
 QuicPacketCreator::QuicPacketCreator(QuicConnectionId server_connection_id,
                                      QuicFramer* framer,
                                      DelegateInterface* delegate)
-    : QuicPacketCreator(server_connection_id,
-                        framer,
-                        QuicRandom::GetInstance(),
+    : QuicPacketCreator(server_connection_id, framer, QuicRandom::GetInstance(),
                         delegate) {}
 
 QuicPacketCreator::QuicPacketCreator(QuicConnectionId server_connection_id,
@@ -271,8 +269,7 @@
 }
 
 void QuicPacketCreator::SkipNPacketNumbers(
-    QuicPacketCount count,
-    QuicPacketNumber least_packet_awaited_by_peer,
+    QuicPacketCount count, QuicPacketNumber least_packet_awaited_by_peer,
     QuicPacketCount max_packets_in_flight) {
   if (!queued_frames_.empty()) {
     // Don't change creator state if there are frames queued.
@@ -299,11 +296,8 @@
 }
 
 bool QuicPacketCreator::ConsumeCryptoDataToFillCurrentPacket(
-    EncryptionLevel level,
-    size_t write_length,
-    QuicStreamOffset offset,
-    bool needs_full_padding,
-    TransmissionType transmission_type,
+    EncryptionLevel level, size_t write_length, QuicStreamOffset offset,
+    bool needs_full_padding, TransmissionType transmission_type,
     QuicFrame* frame) {
   QUIC_DVLOG(2) << ENDPOINT << "ConsumeCryptoDataToFillCurrentPacket " << level
                 << " write_length " << write_length << " offset " << offset
@@ -325,12 +319,8 @@
 }
 
 bool QuicPacketCreator::ConsumeDataToFillCurrentPacket(
-    QuicStreamId id,
-    size_t data_size,
-    QuicStreamOffset offset,
-    bool fin,
-    bool needs_full_padding,
-    TransmissionType transmission_type,
+    QuicStreamId id, size_t data_size, QuicStreamOffset offset, bool fin,
+    bool needs_full_padding, TransmissionType transmission_type,
     QuicFrame* frame) {
   if (!HasRoomForStreamFrame(id, offset, data_size)) {
     return false;
@@ -394,13 +384,11 @@
 size_t QuicPacketCreator::StreamFramePacketOverhead(
     QuicTransportVersion version,
     QuicConnectionIdLength destination_connection_id_length,
-    QuicConnectionIdLength source_connection_id_length,
-    bool include_version,
+    QuicConnectionIdLength source_connection_id_length, bool include_version,
     bool include_diversification_nonce,
     QuicPacketNumberLength packet_number_length,
     QuicVariableLengthIntegerLength retry_token_length_length,
-    QuicVariableLengthIntegerLength length_length,
-    QuicStreamOffset offset) {
+    QuicVariableLengthIntegerLength length_length, QuicStreamOffset offset) {
   return GetPacketHeaderSize(version, destination_connection_id_length,
                              source_connection_id_length, include_version,
                              include_diversification_nonce,
@@ -413,10 +401,8 @@
                                            kMaxOutgoingPacketSize /* unused */);
 }
 
-void QuicPacketCreator::CreateStreamFrame(QuicStreamId id,
-                                          size_t data_size,
-                                          QuicStreamOffset offset,
-                                          bool fin,
+void QuicPacketCreator::CreateStreamFrame(QuicStreamId id, size_t data_size,
+                                          QuicStreamOffset offset, bool fin,
                                           QuicFrame* frame) {
   // Make sure max_packet_length_ is greater than the largest possible overhead
   // or max_packet_length_ is set to the soft limit.
@@ -516,9 +502,7 @@
 }
 
 size_t QuicPacketCreator::ReserializeInitialPacketInCoalescedPacket(
-    const SerializedPacket& packet,
-    size_t padding_size,
-    char* buffer,
+    const SerializedPacket& packet, size_t padding_size, char* buffer,
     size_t buffer_len) {
   QUIC_BUG_IF(quic_bug_12398_7, packet.encryption_level != ENCRYPTION_INITIAL);
   QUIC_BUG_IF(quic_bug_12398_8, packet.nonretransmittable_frames.empty() &&
@@ -586,13 +570,9 @@
 }
 
 void QuicPacketCreator::CreateAndSerializeStreamFrame(
-    QuicStreamId id,
-    size_t write_length,
-    QuicStreamOffset iov_offset,
-    QuicStreamOffset stream_offset,
-    bool fin,
-    TransmissionType transmission_type,
-    size_t* num_bytes_consumed) {
+    QuicStreamId id, size_t write_length, QuicStreamOffset iov_offset,
+    QuicStreamOffset stream_offset, bool fin,
+    TransmissionType transmission_type, size_t* num_bytes_consumed) {
   // TODO(b/167222597): consider using ScopedSerializationFailureHandler.
   QUICHE_DCHECK(queued_frames_.empty()) << ENDPOINT;
   QUICHE_DCHECK(!QuicUtils::IsCryptoStreamId(transport_version(), id))
@@ -742,8 +722,7 @@
 
 // static
 size_t QuicPacketCreator::ExpansionOnNewFrameWithLastFrame(
-    const QuicFrame& last_frame,
-    QuicTransportVersion version) {
+    const QuicFrame& last_frame, QuicTransportVersion version) {
   if (last_frame.type == MESSAGE_FRAME) {
     return QuicDataWriter::GetVarInt62Len(
         last_frame.message_frame->message_length);
@@ -767,8 +746,7 @@
 }
 
 bool QuicPacketCreator::AddPaddedSavedFrame(
-    const QuicFrame& frame,
-    TransmissionType transmission_type) {
+    const QuicFrame& frame, TransmissionType transmission_type) {
   if (AddFrame(frame, transmission_type)) {
     needs_full_padding_ = true;
     return true;
@@ -778,8 +756,7 @@
 
 absl::optional<size_t>
 QuicPacketCreator::MaybeBuildDataPacketWithChaosProtection(
-    const QuicPacketHeader& header,
-    char* buffer) {
+    const QuicPacketHeader& header, char* buffer) {
   if (!chaos_protection_enabled_ ||
       packet_.encryption_level != ENCRYPTION_INITIAL ||
       !framer_->version().UsesCryptoFrames() || queued_frames_.size() != 2u ||
@@ -1046,11 +1023,8 @@
 }
 
 size_t QuicPacketCreator::BuildPaddedPathChallengePacket(
-    const QuicPacketHeader& header,
-    char* buffer,
-    size_t packet_length,
-    const QuicPathFrameBuffer& payload,
-    EncryptionLevel level) {
+    const QuicPacketHeader& header, char* buffer, size_t packet_length,
+    const QuicPathFrameBuffer& payload, EncryptionLevel level) {
   QUICHE_DCHECK(VersionHasIetfQuicFrames(framer_->transport_version()))
       << ENDPOINT;
   QuicFrames frames;
@@ -1071,12 +1045,9 @@
 }
 
 size_t QuicPacketCreator::BuildPathResponsePacket(
-    const QuicPacketHeader& header,
-    char* buffer,
-    size_t packet_length,
+    const QuicPacketHeader& header, char* buffer, size_t packet_length,
     const quiche::QuicheCircularDeque<QuicPathFrameBuffer>& payloads,
-    const bool is_padded,
-    EncryptionLevel level) {
+    const bool is_padded, EncryptionLevel level) {
   if (payloads.empty()) {
     QUIC_BUG(quic_bug_12398_14)
         << ENDPOINT
@@ -1106,9 +1077,7 @@
 }
 
 size_t QuicPacketCreator::BuildConnectivityProbingPacket(
-    const QuicPacketHeader& header,
-    char* buffer,
-    size_t packet_length,
+    const QuicPacketHeader& header, char* buffer, size_t packet_length,
     EncryptionLevel level) {
   QuicFrames frames;
 
@@ -1124,9 +1093,7 @@
 }
 
 size_t QuicPacketCreator::SerializeCoalescedPacket(
-    const QuicCoalescedPacket& coalesced,
-    char* buffer,
-    size_t buffer_len) {
+    const QuicCoalescedPacket& coalesced, char* buffer, size_t buffer_len) {
   if (HasPendingFrames()) {
     QUIC_BUG(quic_bug_10752_18)
         << ENDPOINT << "Try to serialize coalesced packet with pending frames";
@@ -1428,10 +1395,7 @@
 }
 
 QuicConsumedData QuicPacketCreator::ConsumeDataFastPath(
-    QuicStreamId id,
-    size_t write_length,
-    QuicStreamOffset offset,
-    bool fin,
+    QuicStreamId id, size_t write_length, QuicStreamOffset offset, bool fin,
     size_t total_bytes_consumed) {
   QUICHE_DCHECK(!QuicUtils::IsCryptoStreamId(transport_version(), id))
       << ENDPOINT;
@@ -2155,21 +2119,15 @@
                                                               : "Client: ")
 
 QuicPacketCreator::ScopedPeerAddressContext::ScopedPeerAddressContext(
-    QuicPacketCreator* creator,
-    QuicSocketAddress address,
+    QuicPacketCreator* creator, QuicSocketAddress address,
     bool update_connection_id)
-    : ScopedPeerAddressContext(creator,
-                               address,
-                               EmptyQuicConnectionId(),
-                               EmptyQuicConnectionId(),
-                               update_connection_id) {}
+    : ScopedPeerAddressContext(creator, address, EmptyQuicConnectionId(),
+                               EmptyQuicConnectionId(), update_connection_id) {}
 
 QuicPacketCreator::ScopedPeerAddressContext::ScopedPeerAddressContext(
-    QuicPacketCreator* creator,
-    QuicSocketAddress address,
+    QuicPacketCreator* creator, QuicSocketAddress address,
     const QuicConnectionId& client_connection_id,
-    const QuicConnectionId& server_connection_id,
-    bool update_connection_id)
+    const QuicConnectionId& server_connection_id, bool update_connection_id)
     : creator_(creator),
       old_peer_address_(creator_->packet_.peer_address),
       old_client_connection_id_(creator_->GetClientConnectionId()),
@@ -2284,9 +2242,7 @@
   return true;
 }
 
-bool QuicPacketCreator::HasRetryToken() const {
-  return !retry_token_.empty();
-}
+bool QuicPacketCreator::HasRetryToken() const { return !retry_token_.empty(); }
 
 #undef ENDPOINT  // undef for jumbo builds
 }  // namespace quic
diff --git a/quiche/quic/core/quic_packet_creator.h b/quiche/quic/core/quic_packet_creator.h
index 55b7a2d..bc792e1 100644
--- a/quiche/quic/core/quic_packet_creator.h
+++ b/quiche/quic/core/quic_packet_creator.h
@@ -68,8 +68,7 @@
     // to delegate via OnSerializedPacket(). Called when a packet is about to be
     // serialized.
     virtual SerializedPacketFate GetSerializedPacketFate(
-        bool is_mtu_discovery,
-        EncryptionLevel encryption_level) = 0;
+        bool is_mtu_discovery, EncryptionLevel encryption_level) = 0;
   };
 
   // Interface which gets callbacks from the QuicPacketCreator at interesting
@@ -111,13 +110,10 @@
     bool update_connection_id_;
   };
 
-  QuicPacketCreator(QuicConnectionId server_connection_id,
-                    QuicFramer* framer,
+  QuicPacketCreator(QuicConnectionId server_connection_id, QuicFramer* framer,
                     DelegateInterface* delegate);
-  QuicPacketCreator(QuicConnectionId server_connection_id,
-                    QuicFramer* framer,
-                    QuicRandom* random,
-                    DelegateInterface* delegate);
+  QuicPacketCreator(QuicConnectionId server_connection_id, QuicFramer* framer,
+                    QuicRandom* random, DelegateInterface* delegate);
   QuicPacketCreator(const QuicPacketCreator&) = delete;
   QuicPacketCreator& operator=(const QuicPacketCreator&) = delete;
 
@@ -147,22 +143,18 @@
   static size_t StreamFramePacketOverhead(
       QuicTransportVersion version,
       QuicConnectionIdLength destination_connection_id_length,
-      QuicConnectionIdLength source_connection_id_length,
-      bool include_version,
+      QuicConnectionIdLength source_connection_id_length, bool include_version,
       bool include_diversification_nonce,
       QuicPacketNumberLength packet_number_length,
       QuicVariableLengthIntegerLength retry_token_length_length,
-      QuicVariableLengthIntegerLength length_length,
-      QuicStreamOffset offset);
+      QuicVariableLengthIntegerLength length_length, QuicStreamOffset offset);
 
   // Returns false and flushes all pending frames if current open packet is
   // full.
   // If current packet is not full, creates a stream frame that fits into the
   // open packet and adds it to the packet.
-  bool ConsumeDataToFillCurrentPacket(QuicStreamId id,
-                                      size_t data_size,
-                                      QuicStreamOffset offset,
-                                      bool fin,
+  bool ConsumeDataToFillCurrentPacket(QuicStreamId id, size_t data_size,
+                                      QuicStreamOffset offset, bool fin,
                                       bool needs_full_padding,
                                       TransmissionType transmission_type,
                                       QuicFrame* frame);
@@ -179,8 +171,7 @@
   // Returns true if current open packet can accommodate more stream frames of
   // stream |id| at |offset| and data length |data_size|, false otherwise.
   // TODO(fayang): mark this const by moving RemoveSoftMaxPacketLength out.
-  bool HasRoomForStreamFrame(QuicStreamId id,
-                             QuicStreamOffset offset,
+  bool HasRoomForStreamFrame(QuicStreamId id, QuicStreamOffset offset,
                              size_t data_size);
 
   // Returns true if current open packet can accommodate a message frame of
@@ -196,11 +187,9 @@
   // QuicStreamFrame to the returned SerializedPacket.  Sets
   // |num_bytes_consumed| to the number of bytes consumed to create the
   // QuicStreamFrame.
-  void CreateAndSerializeStreamFrame(QuicStreamId id,
-                                     size_t write_length,
+  void CreateAndSerializeStreamFrame(QuicStreamId id, size_t write_length,
                                      QuicStreamOffset iov_offset,
-                                     QuicStreamOffset stream_offset,
-                                     bool fin,
+                                     QuicStreamOffset stream_offset, bool fin,
                                      TransmissionType transmission_type,
                                      size_t* num_bytes_consumed);
 
@@ -367,8 +356,7 @@
   // When |state| is FIN_AND_PADDING, random padding of size [1, 256] will be
   // added after stream frames. If current constructed packet cannot
   // accommodate, the padding will overflow to the next packet(s).
-  QuicConsumedData ConsumeData(QuicStreamId id,
-                               size_t write_length,
+  QuicConsumedData ConsumeData(QuicStreamId id, size_t write_length,
                                QuicStreamOffset offset,
                                StreamSendingState state);
 
@@ -377,18 +365,15 @@
   // This path does not support padding, or bundling pending frames.
   // In case we access this method from ConsumeData, total_bytes_consumed
   // keeps track of how many bytes have already been consumed.
-  QuicConsumedData ConsumeDataFastPath(QuicStreamId id,
-                                       size_t write_length,
-                                       QuicStreamOffset offset,
-                                       bool fin,
+  QuicConsumedData ConsumeDataFastPath(QuicStreamId id, size_t write_length,
+                                       QuicStreamOffset offset, bool fin,
                                        size_t total_bytes_consumed);
 
   // Consumes data for CRYPTO frames sent at |level| starting at |offset| for a
   // total of |write_length| bytes, and returns the number of bytes consumed.
   // The data is passed into the packet creator and serialized into one or more
   // packets.
-  size_t ConsumeCryptoData(EncryptionLevel level,
-                           size_t write_length,
+  size_t ConsumeCryptoData(EncryptionLevel level, size_t write_length,
                            QuicStreamOffset offset);
 
   // Generates an MTU discovery packet of specified size.
@@ -464,8 +449,7 @@
   // Serialize a probing packet that uses IETF QUIC's PATH CHALLENGE frame. Also
   // fills the packet with padding.
   size_t BuildPaddedPathChallengePacket(const QuicPacketHeader& header,
-                                        char* buffer,
-                                        size_t packet_length,
+                                        char* buffer, size_t packet_length,
                                         const QuicPathFrameBuffer& payload,
                                         EncryptionLevel level);
 
@@ -474,25 +458,20 @@
   // 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 QuicPacketHeader& header, char* buffer, size_t packet_length,
       const quiche::QuicheCircularDeque<QuicPathFrameBuffer>& payloads,
-      const bool is_padded,
-      EncryptionLevel level);
+      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.
   size_t BuildConnectivityProbingPacket(const QuicPacketHeader& header,
-                                        char* buffer,
-                                        size_t packet_length,
+                                        char* buffer, size_t packet_length,
                                         EncryptionLevel level);
 
   // Serializes |coalesced| to provided |buffer|, returns coalesced packet
   // length if serialization succeeds. Otherwise, returns 0.
   size_t SerializeCoalescedPacket(const QuicCoalescedPacket& coalesced,
-                                  char* buffer,
-                                  size_t buffer_len);
+                                  char* buffer, size_t buffer_len);
 
   // Returns true if max_packet_length_ is currently a soft value.
   bool HasSoftMaxPacketLength() const;
@@ -528,25 +507,19 @@
   // supposed to be protected or if serialization fails then absl::nullopt is
   // returned. Otherwise returns the serialized length.
   absl::optional<size_t> MaybeBuildDataPacketWithChaosProtection(
-      const QuicPacketHeader& header,
-      char* buffer);
+      const QuicPacketHeader& header, char* buffer);
 
   // Creates a stream frame which fits into the current open packet. If
   // |data_size| is 0 and fin is true, the expected behavior is to consume
   // the fin.
-  void CreateStreamFrame(QuicStreamId id,
-                         size_t data_size,
-                         QuicStreamOffset offset,
-                         bool fin,
-                         QuicFrame* frame);
+  void CreateStreamFrame(QuicStreamId id, size_t data_size,
+                         QuicStreamOffset offset, bool fin, QuicFrame* frame);
 
   // Creates a CRYPTO frame which fits into the current open packet. Returns
   // false if there isn't enough room in the current open packet for a CRYPTO
   // frame, and true if there is.
-  bool CreateCryptoFrame(EncryptionLevel level,
-                         size_t write_length,
-                         QuicStreamOffset offset,
-                         QuicFrame* frame);
+  bool CreateCryptoFrame(EncryptionLevel level, size_t write_length,
+                         QuicStreamOffset offset, QuicFrame* frame);
 
   void FillPacketHeader(QuicPacketHeader* header);
 
@@ -577,9 +550,7 @@
   // |padding_size| indicates the size of necessary padding. Returns 0 if
   // serialization fails.
   size_t ReserializeInitialPacketInCoalescedPacket(
-      const SerializedPacket& packet,
-      size_t padding_size,
-      char* buffer,
+      const SerializedPacket& packet, size_t padding_size, char* buffer,
       size_t buffer_len);
 
   // Tries to coalesce |frame| with the back of |queued_frames_|.
diff --git a/quiche/quic/core/quic_packet_creator_test.cc b/quiche/quic/core/quic_packet_creator_test.cc
index 7bbd237..b223326 100644
--- a/quiche/quic/core/quic_packet_creator_test.cc
+++ b/quiche/quic/core/quic_packet_creator_test.cc
@@ -88,18 +88,14 @@
 
   MOCK_METHOD(void, OnFrameAddedToPacket, (const QuicFrame& frame), (override));
 
-  MOCK_METHOD(void,
-              OnStreamFrameCoalesced,
-              (const QuicStreamFrame& frame),
+  MOCK_METHOD(void, OnStreamFrameCoalesced, (const QuicStreamFrame& frame),
               (override));
 };
 
 class TestPacketCreator : public QuicPacketCreator {
  public:
-  TestPacketCreator(QuicConnectionId connection_id,
-                    QuicFramer* framer,
-                    DelegateInterface* delegate,
-                    SimpleDataProducer* producer)
+  TestPacketCreator(QuicConnectionId connection_id, QuicFramer* framer,
+                    DelegateInterface* delegate, SimpleDataProducer* producer)
       : QuicPacketCreator(connection_id, framer, delegate),
         producer_(producer),
         version_(framer->version()) {}
@@ -146,14 +142,10 @@
  protected:
   QuicPacketCreatorTest()
       : connection_id_(TestConnectionId(2)),
-        server_framer_(SupportedVersions(GetParam().version),
-                       QuicTime::Zero(),
-                       Perspective::IS_SERVER,
-                       connection_id_.length()),
-        client_framer_(SupportedVersions(GetParam().version),
-                       QuicTime::Zero(),
-                       Perspective::IS_CLIENT,
-                       connection_id_.length()),
+        server_framer_(SupportedVersions(GetParam().version), QuicTime::Zero(),
+                       Perspective::IS_SERVER, connection_id_.length()),
+        client_framer_(SupportedVersions(GetParam().version), QuicTime::Zero(),
+                       Perspective::IS_CLIENT, connection_id_.length()),
         data_("foo"),
         creator_(connection_id_, &client_framer_, &delegate_, &producer_) {
     EXPECT_CALL(delegate_, GetPacketBuffer())
@@ -208,10 +200,8 @@
     server_framer_.ProcessPacket(encrypted_packet);
   }
 
-  void CheckStreamFrame(const QuicFrame& frame,
-                        QuicStreamId stream_id,
-                        const std::string& data,
-                        QuicStreamOffset offset,
+  void CheckStreamFrame(const QuicFrame& frame, QuicStreamId stream_id,
+                        const std::string& data, QuicStreamOffset offset,
                         bool fin) {
     EXPECT_EQ(STREAM_FRAME, frame.type);
     EXPECT_EQ(stream_id, frame.stream_frame.stream_id);
@@ -286,8 +276,7 @@
 // Run all packet creator tests with all supported versions of QUIC, and with
 // and without version in the packet header, as well as doing a run for each
 // length of truncated connection id.
-INSTANTIATE_TEST_SUITE_P(QuicPacketCreatorTests,
-                         QuicPacketCreatorTest,
+INSTANTIATE_TEST_SUITE_P(QuicPacketCreatorTests, QuicPacketCreatorTest,
                          ::testing::ValuesIn(GetTestParams()),
                          ::testing::PrintToStringParamName());
 
@@ -2287,24 +2276,17 @@
   MockDelegate& operator=(const MockDelegate&) = delete;
   ~MockDelegate() override {}
 
-  MOCK_METHOD(bool,
-              ShouldGeneratePacket,
+  MOCK_METHOD(bool, ShouldGeneratePacket,
               (HasRetransmittableData retransmittable, IsHandshake handshake),
               (override));
-  MOCK_METHOD(const QuicFrames,
-              MaybeBundleAckOpportunistically,
-              (),
+  MOCK_METHOD(const QuicFrames, MaybeBundleAckOpportunistically, (),
               (override));
   MOCK_METHOD(QuicPacketBuffer, GetPacketBuffer, (), (override));
   MOCK_METHOD(void, OnSerializedPacket, (SerializedPacket), (override));
-  MOCK_METHOD(void,
-              OnUnrecoverableError,
-              (QuicErrorCode, const std::string&),
+  MOCK_METHOD(void, OnUnrecoverableError, (QuicErrorCode, const std::string&),
               (override));
-  MOCK_METHOD(SerializedPacketFate,
-              GetSerializedPacketFate,
-              (bool, EncryptionLevel),
-              (override));
+  MOCK_METHOD(SerializedPacketFate, GetSerializedPacketFate,
+              (bool, EncryptionLevel), (override));
 
   void SetCanWriteAnything() {
     EXPECT_CALL(*this, ShouldGeneratePacket(_, _)).WillRepeatedly(Return(true));
@@ -2359,8 +2341,7 @@
 class MultiplePacketsTestPacketCreator : public QuicPacketCreator {
  public:
   MultiplePacketsTestPacketCreator(
-      QuicConnectionId connection_id,
-      QuicFramer* framer,
+      QuicConnectionId connection_id, QuicFramer* framer,
       QuicRandom* random_generator,
       QuicPacketCreator::DelegateInterface* delegate,
       SimpleDataProducer* producer)
@@ -2420,8 +2401,7 @@
                                               absl::MakeSpan(&message, 1));
   }
 
-  size_t ConsumeCryptoData(EncryptionLevel level,
-                           absl::string_view data,
+  size_t ConsumeCryptoData(EncryptionLevel level, absl::string_view data,
                            QuicStreamOffset offset) {
     producer_->SaveCryptoData(level, offset, data);
     if (!has_ack() && delegate_->ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA,
@@ -2439,14 +2419,9 @@
 class QuicPacketCreatorMultiplePacketsTest : public QuicTest {
  public:
   QuicPacketCreatorMultiplePacketsTest()
-      : framer_(AllSupportedVersions(),
-                QuicTime::Zero(),
-                Perspective::IS_CLIENT,
-                kQuicDefaultConnectionIdLength),
-        creator_(TestConnectionId(),
-                 &framer_,
-                 &random_creator_,
-                 &delegate_,
+      : framer_(AllSupportedVersions(), QuicTime::Zero(),
+                Perspective::IS_CLIENT, kQuicDefaultConnectionIdLength),
+        creator_(TestConnectionId(), &framer_, &random_creator_, &delegate_,
                  &producer_),
         ack_frame_(InitAckFrame(1)) {
     EXPECT_CALL(delegate_, GetPacketBuffer())
diff --git a/quiche/quic/core/quic_packet_number.cc b/quiche/quic/core/quic_packet_number.cc
index ab220bf..c7bda67 100644
--- a/quiche/quic/core/quic_packet_number.cc
+++ b/quiche/quic/core/quic_packet_number.cc
@@ -11,9 +11,7 @@
 
 namespace quic {
 
-void QuicPacketNumber::Clear() {
-  packet_number_ = UninitializedPacketNumber();
-}
+void QuicPacketNumber::Clear() { packet_number_ = UninitializedPacketNumber(); }
 
 void QuicPacketNumber::UpdateMax(QuicPacketNumber new_value) {
   if (!new_value.IsInitialized()) {
diff --git a/quiche/quic/core/quic_packet_number.h b/quiche/quic/core/quic_packet_number.h
index 0cd94c9..8d6b1b6 100644
--- a/quiche/quic/core/quic_packet_number.h
+++ b/quiche/quic/core/quic_packet_number.h
@@ -70,8 +70,7 @@
   std::string ToString() const;
 
   QUIC_EXPORT_PRIVATE friend std::ostream& operator<<(
-      std::ostream& os,
-      const QuicPacketNumber& p);
+      std::ostream& os, const QuicPacketNumber& p);
 
  private:
   // All following operators REQUIRE operands.Initialized() == true.
diff --git a/quiche/quic/core/quic_packet_reader.cc b/quiche/quic/core/quic_packet_reader.cc
index e6c1d2d..ec72824 100644
--- a/quiche/quic/core/quic_packet_reader.cc
+++ b/quiche/quic/core/quic_packet_reader.cc
@@ -35,10 +35,7 @@
 QuicPacketReader::~QuicPacketReader() = default;
 
 bool QuicPacketReader::ReadAndDispatchPackets(
-    int fd,
-    int port,
-    const QuicClock& clock,
-    ProcessPacketInterface* processor,
+    int fd, int port, const QuicClock& clock, ProcessPacketInterface* processor,
     QuicPacketCount* /*packets_dropped*/) {
   // Reset all read_results for reuse.
   for (size_t i = 0; i < read_results_.size(); ++i) {
@@ -112,8 +109,7 @@
 
 // static
 QuicIpAddress QuicPacketReader::GetSelfIpFromPacketInfo(
-    const QuicUdpPacketInfo& packet_info,
-    bool prefer_v6_ip) {
+    const QuicUdpPacketInfo& packet_info, bool prefer_v6_ip) {
   if (prefer_v6_ip) {
     if (packet_info.HasValue(QuicUdpPacketInfoBit::V6_SELF_IP)) {
       return packet_info.self_v6_ip();
diff --git a/quiche/quic/core/quic_packet_reader.h b/quiche/quic/core/quic_packet_reader.h
index 18b78d7..6ec2682 100644
--- a/quiche/quic/core/quic_packet_reader.h
+++ b/quiche/quic/core/quic_packet_reader.h
@@ -35,9 +35,7 @@
   // to track dropped packets and some packets are read.
   // If the socket has timestamping enabled, the per packet timestamps will be
   // passed to the processor. Otherwise, |clock| will be used.
-  virtual bool ReadAndDispatchPackets(int fd,
-                                      int port,
-                                      const QuicClock& clock,
+  virtual bool ReadAndDispatchPackets(int fd, int port, const QuicClock& clock,
                                       ProcessPacketInterface* processor,
                                       QuicPacketCount* packets_dropped);
 
@@ -47,8 +45,7 @@
   // that case, |prefer_v6_ip| is used to determine which one is used as the
   // return value. If neither v4 nor v6 ip exists, return an uninitialized ip.
   static QuicIpAddress GetSelfIpFromPacketInfo(
-      const QuicUdpPacketInfo& packet_info,
-      bool prefer_v6_ip);
+      const QuicUdpPacketInfo& packet_info, bool prefer_v6_ip);
 
   struct QUIC_EXPORT_PRIVATE ReadBuffer {
     ABSL_CACHELINE_ALIGNED char
diff --git a/quiche/quic/core/quic_packet_writer.h b/quiche/quic/core/quic_packet_writer.h
index 1406c19..95d167b 100644
--- a/quiche/quic/core/quic_packet_writer.h
+++ b/quiche/quic/core/quic_packet_writer.h
@@ -102,8 +102,7 @@
   // d) When WRITE_STATUS_BLOCKED_DATA_BUFFERED is returned, the caller expects
   // 1) the writer owns the packet buffers, and 2) the writer will re-send the
   // packet when it unblocks.
-  virtual WriteResult WritePacket(const char* buffer,
-                                  size_t buf_len,
+  virtual WriteResult WritePacket(const char* buffer, size_t buf_len,
                                   const QuicIpAddress& self_address,
                                   const QuicSocketAddress& peer_address,
                                   PerPacketOptions* options) = 0;
diff --git a/quiche/quic/core/quic_packet_writer_wrapper.cc b/quiche/quic/core/quic_packet_writer_wrapper.cc
index 522f6bf..c040c91 100644
--- a/quiche/quic/core/quic_packet_writer_wrapper.cc
+++ b/quiche/quic/core/quic_packet_writer_wrapper.cc
@@ -10,16 +10,11 @@
 
 QuicPacketWriterWrapper::QuicPacketWriterWrapper() = default;
 
-QuicPacketWriterWrapper::~QuicPacketWriterWrapper() {
-  unset_writer();
-}
+QuicPacketWriterWrapper::~QuicPacketWriterWrapper() { unset_writer(); }
 
 WriteResult QuicPacketWriterWrapper::WritePacket(
-    const char* buffer,
-    size_t buf_len,
-    const QuicIpAddress& self_address,
-    const QuicSocketAddress& peer_address,
-    PerPacketOptions* options) {
+    const char* buffer, size_t buf_len, const QuicIpAddress& self_address,
+    const QuicSocketAddress& peer_address, PerPacketOptions* options) {
   return writer_->WritePacket(buffer, buf_len, self_address, peer_address,
                               options);
 }
@@ -28,9 +23,7 @@
   return writer_->IsWriteBlocked();
 }
 
-void QuicPacketWriterWrapper::SetWritable() {
-  writer_->SetWritable();
-}
+void QuicPacketWriterWrapper::SetWritable() { writer_->SetWritable(); }
 
 absl::optional<int> QuicPacketWriterWrapper::MessageTooBigErrorCode() const {
   return writer_->MessageTooBigErrorCode();
@@ -50,14 +43,11 @@
 }
 
 QuicPacketBuffer QuicPacketWriterWrapper::GetNextWriteLocation(
-    const QuicIpAddress& self_address,
-    const QuicSocketAddress& peer_address) {
+    const QuicIpAddress& self_address, const QuicSocketAddress& peer_address) {
   return writer_->GetNextWriteLocation(self_address, peer_address);
 }
 
-WriteResult QuicPacketWriterWrapper::Flush() {
-  return writer_->Flush();
-}
+WriteResult QuicPacketWriterWrapper::Flush() { return writer_->Flush(); }
 
 void QuicPacketWriterWrapper::set_writer(QuicPacketWriter* writer) {
   unset_writer();
diff --git a/quiche/quic/core/quic_packet_writer_wrapper.h b/quiche/quic/core/quic_packet_writer_wrapper.h
index 4f8ab61..3afeaf1 100644
--- a/quiche/quic/core/quic_packet_writer_wrapper.h
+++ b/quiche/quic/core/quic_packet_writer_wrapper.h
@@ -24,8 +24,7 @@
 
   // Default implementation of the QuicPacketWriter interface. Passes everything
   // to |writer_|.
-  WriteResult WritePacket(const char* buffer,
-                          size_t buf_len,
+  WriteResult WritePacket(const char* buffer, size_t buf_len,
                           const QuicIpAddress& self_address,
                           const QuicSocketAddress& peer_address,
                           PerPacketOptions* options) override;
diff --git a/quiche/quic/core/quic_packets.cc b/quiche/quic/core/quic_packets.cc
index d3db3b7..57d6ba7 100644
--- a/quiche/quic/core/quic_packets.cc
+++ b/quiche/quic/core/quic_packets.cc
@@ -19,8 +19,7 @@
 namespace quic {
 
 QuicConnectionId GetServerConnectionIdAsRecipient(
-    const QuicPacketHeader& header,
-    Perspective perspective) {
+    const QuicPacketHeader& header, Perspective perspective) {
   if (perspective == Perspective::IS_SERVER) {
     return header.destination_connection_id;
   }
@@ -28,8 +27,7 @@
 }
 
 QuicConnectionId GetClientConnectionIdAsRecipient(
-    const QuicPacketHeader& header,
-    Perspective perspective) {
+    const QuicPacketHeader& header, Perspective perspective) {
   if (perspective == Perspective::IS_CLIENT) {
     return header.destination_connection_id;
   }
@@ -45,8 +43,7 @@
 }
 
 QuicConnectionIdIncluded GetServerConnectionIdIncludedAsSender(
-    const QuicPacketHeader& header,
-    Perspective perspective) {
+    const QuicPacketHeader& header, Perspective perspective) {
   if (perspective == Perspective::IS_CLIENT) {
     return header.destination_connection_id_included;
   }
@@ -62,8 +59,7 @@
 }
 
 QuicConnectionIdIncluded GetClientConnectionIdIncludedAsSender(
-    const QuicPacketHeader& header,
-    Perspective perspective) {
+    const QuicPacketHeader& header, Perspective perspective) {
   if (perspective == Perspective::IS_CLIENT) {
     return header.source_connection_id_included;
   }
@@ -106,8 +102,7 @@
 size_t GetPacketHeaderSize(
     QuicTransportVersion version,
     QuicConnectionIdLength destination_connection_id_length,
-    QuicConnectionIdLength source_connection_id_length,
-    bool include_version,
+    QuicConnectionIdLength source_connection_id_length, bool include_version,
     bool include_diversification_nonce,
     QuicPacketNumberLength packet_number_length,
     QuicVariableLengthIntegerLength retry_token_length_length,
@@ -155,8 +150,7 @@
 size_t GetStartOfEncryptedData(
     QuicTransportVersion version,
     QuicConnectionIdLength destination_connection_id_length,
-    QuicConnectionIdLength source_connection_id_length,
-    bool include_version,
+    QuicConnectionIdLength source_connection_id_length, bool include_version,
     bool include_diversification_nonce,
     QuicPacketNumberLength packet_number_length,
     QuicVariableLengthIntegerLength retry_token_length_length,
@@ -217,8 +211,7 @@
     : stateless_reset_token({}) {}
 
 QuicIetfStatelessResetPacket::QuicIetfStatelessResetPacket(
-    const QuicPacketHeader& header,
-    StatelessResetToken token)
+    const QuicPacketHeader& header, StatelessResetToken token)
     : header(header), stateless_reset_token(token) {}
 
 QuicIetfStatelessResetPacket::QuicIetfStatelessResetPacket(
@@ -287,12 +280,9 @@
 }
 
 QuicPacket::QuicPacket(
-    char* buffer,
-    size_t length,
-    bool owns_buffer,
+    char* buffer, size_t length, bool owns_buffer,
     QuicConnectionIdLength destination_connection_id_length,
-    QuicConnectionIdLength source_connection_id_length,
-    bool includes_version,
+    QuicConnectionIdLength source_connection_id_length, bool includes_version,
     bool includes_diversification_nonce,
     QuicPacketNumberLength packet_number_length,
     QuicVariableLengthIntegerLength retry_token_length_length,
@@ -309,28 +299,20 @@
       retry_token_length_(retry_token_length),
       length_length_(length_length) {}
 
-QuicPacket::QuicPacket(QuicTransportVersion /*version*/,
-                       char* buffer,
-                       size_t length,
-                       bool owns_buffer,
+QuicPacket::QuicPacket(QuicTransportVersion /*version*/, char* buffer,
+                       size_t length, bool owns_buffer,
                        const QuicPacketHeader& header)
-    : QuicPacket(buffer,
-                 length,
-                 owns_buffer,
+    : QuicPacket(buffer, length, owns_buffer,
                  GetIncludedDestinationConnectionIdLength(header),
                  GetIncludedSourceConnectionIdLength(header),
-                 header.version_flag,
-                 header.nonce != nullptr,
-                 header.packet_number_length,
-                 header.retry_token_length_length,
-                 header.retry_token.length(),
-                 header.length_length) {}
+                 header.version_flag, header.nonce != nullptr,
+                 header.packet_number_length, header.retry_token_length_length,
+                 header.retry_token.length(), header.length_length) {}
 
 QuicEncryptedPacket::QuicEncryptedPacket(const char* buffer, size_t length)
     : QuicData(buffer, length) {}
 
-QuicEncryptedPacket::QuicEncryptedPacket(const char* buffer,
-                                         size_t length,
+QuicEncryptedPacket::QuicEncryptedPacket(const char* buffer, size_t length,
                                          bool owns_buffer)
     : QuicData(buffer, length, owns_buffer) {}
 
@@ -348,47 +330,27 @@
   return os;
 }
 
-QuicReceivedPacket::QuicReceivedPacket(const char* buffer,
-                                       size_t length,
+QuicReceivedPacket::QuicReceivedPacket(const char* buffer, size_t length,
                                        QuicTime receipt_time)
-    : QuicReceivedPacket(buffer,
-                         length,
-                         receipt_time,
+    : QuicReceivedPacket(buffer, length, receipt_time,
                          false /* owns_buffer */) {}
 
-QuicReceivedPacket::QuicReceivedPacket(const char* buffer,
-                                       size_t length,
-                                       QuicTime receipt_time,
-                                       bool owns_buffer)
-    : QuicReceivedPacket(buffer,
-                         length,
-                         receipt_time,
-                         owns_buffer,
-                         0 /* ttl */,
+QuicReceivedPacket::QuicReceivedPacket(const char* buffer, size_t length,
+                                       QuicTime receipt_time, bool owns_buffer)
+    : QuicReceivedPacket(buffer, length, receipt_time, owns_buffer, 0 /* ttl */,
                          true /* ttl_valid */) {}
 
-QuicReceivedPacket::QuicReceivedPacket(const char* buffer,
-                                       size_t length,
-                                       QuicTime receipt_time,
-                                       bool owns_buffer,
-                                       int ttl,
-                                       bool ttl_valid)
-    : quic::QuicReceivedPacket(buffer,
-                               length,
-                               receipt_time,
-                               owns_buffer,
-                               ttl,
-                               ttl_valid,
-                               nullptr /* packet_headers */,
+QuicReceivedPacket::QuicReceivedPacket(const char* buffer, size_t length,
+                                       QuicTime receipt_time, bool owns_buffer,
+                                       int ttl, bool ttl_valid)
+    : quic::QuicReceivedPacket(buffer, length, receipt_time, owns_buffer, ttl,
+                               ttl_valid, nullptr /* packet_headers */,
                                0 /* headers_length */,
                                false /* owns_header_buffer */) {}
 
-QuicReceivedPacket::QuicReceivedPacket(const char* buffer,
-                                       size_t length,
-                                       QuicTime receipt_time,
-                                       bool owns_buffer,
-                                       int ttl,
-                                       bool ttl_valid,
+QuicReceivedPacket::QuicReceivedPacket(const char* buffer, size_t length,
+                                       QuicTime receipt_time, bool owns_buffer,
+                                       int ttl, bool ttl_valid,
                                        char* packet_headers,
                                        size_t headers_length,
                                        bool owns_header_buffer)
@@ -449,8 +411,7 @@
                                    QuicPacketNumberLength packet_number_length,
                                    const char* encrypted_buffer,
                                    QuicPacketLength encrypted_length,
-                                   bool has_ack,
-                                   bool has_stop_waiting)
+                                   bool has_ack, bool has_stop_waiting)
     : encrypted_buffer(encrypted_buffer),
       encrypted_length(encrypted_length),
       has_crypto_handshake(NOT_HANDSHAKE),
diff --git a/quiche/quic/core/quic_packets.h b/quiche/quic/core/quic_packets.h
index 98ab413..5246f43 100644
--- a/quiche/quic/core/quic_packets.h
+++ b/quiche/quic/core/quic_packets.h
@@ -31,21 +31,18 @@
 
 // Returns the destination connection ID of |header| when |perspective| is
 // server, and the source connection ID when |perspective| is client.
-QUIC_EXPORT_PRIVATE QuicConnectionId
-GetServerConnectionIdAsRecipient(const QuicPacketHeader& header,
-                                 Perspective perspective);
+QUIC_EXPORT_PRIVATE QuicConnectionId GetServerConnectionIdAsRecipient(
+    const QuicPacketHeader& header, Perspective perspective);
 
 // Returns the destination connection ID of |header| when |perspective| is
 // client, and the source connection ID when |perspective| is server.
-QUIC_EXPORT_PRIVATE QuicConnectionId
-GetClientConnectionIdAsRecipient(const QuicPacketHeader& header,
-                                 Perspective perspective);
+QUIC_EXPORT_PRIVATE QuicConnectionId GetClientConnectionIdAsRecipient(
+    const QuicPacketHeader& header, Perspective perspective);
 
 // Returns the destination connection ID of |header| when |perspective| is
 // client, and the source connection ID when |perspective| is server.
-QUIC_EXPORT_PRIVATE QuicConnectionId
-GetServerConnectionIdAsSender(const QuicPacketHeader& header,
-                              Perspective perspective);
+QUIC_EXPORT_PRIVATE QuicConnectionId GetServerConnectionIdAsSender(
+    const QuicPacketHeader& header, Perspective perspective);
 
 // Returns the destination connection ID included of |header| when |perspective|
 // is client, and the source connection ID included when |perspective| is
@@ -56,9 +53,8 @@
 
 // Returns the destination connection ID of |header| when |perspective| is
 // server, and the source connection ID when |perspective| is client.
-QUIC_EXPORT_PRIVATE QuicConnectionId
-GetClientConnectionIdAsSender(const QuicPacketHeader& header,
-                              Perspective perspective);
+QUIC_EXPORT_PRIVATE QuicConnectionId GetClientConnectionIdAsSender(
+    const QuicPacketHeader& header, Perspective perspective);
 
 // Returns the destination connection ID included of |header| when |perspective|
 // is server, and the source connection ID included when |perspective| is
@@ -90,23 +86,20 @@
 GetPacketHeaderSize(QuicTransportVersion version,
                     QuicConnectionIdLength destination_connection_id_length,
                     QuicConnectionIdLength source_connection_id_length,
-                    bool include_version,
-                    bool include_diversification_nonce,
+                    bool include_version, bool include_diversification_nonce,
                     QuicPacketNumberLength packet_number_length,
                     QuicVariableLengthIntegerLength retry_token_length_length,
                     QuicByteCount retry_token_length,
                     QuicVariableLengthIntegerLength length_length);
 
 // Index of the first byte in a QUIC packet of encrypted data.
-QUIC_EXPORT_PRIVATE size_t
-GetStartOfEncryptedData(QuicTransportVersion version,
-                        const QuicPacketHeader& header);
+QUIC_EXPORT_PRIVATE size_t GetStartOfEncryptedData(
+    QuicTransportVersion version, const QuicPacketHeader& header);
 
 QUIC_EXPORT_PRIVATE size_t GetStartOfEncryptedData(
     QuicTransportVersion version,
     QuicConnectionIdLength destination_connection_id_length,
-    QuicConnectionIdLength source_connection_id_length,
-    bool include_version,
+    QuicConnectionIdLength source_connection_id_length, bool include_version,
     bool include_diversification_nonce,
     QuicPacketNumberLength packet_number_length,
     QuicVariableLengthIntegerLength retry_token_length_length,
@@ -121,8 +114,7 @@
   QuicPacketHeader& operator=(const QuicPacketHeader& other);
 
   QUIC_EXPORT_PRIVATE friend std::ostream& operator<<(
-      std::ostream& os,
-      const QuicPacketHeader& header);
+      std::ostream& os, const QuicPacketHeader& header);
 
   // Universal header. All QuicPacket headers will have a connection_id and
   // public flags.
@@ -230,22 +222,16 @@
 
 class QUIC_EXPORT_PRIVATE QuicPacket : public QuicData {
  public:
-  QuicPacket(char* buffer,
-             size_t length,
-             bool owns_buffer,
+  QuicPacket(char* buffer, size_t length, bool owns_buffer,
              QuicConnectionIdLength destination_connection_id_length,
              QuicConnectionIdLength source_connection_id_length,
-             bool includes_version,
-             bool includes_diversification_nonce,
+             bool includes_version, bool includes_diversification_nonce,
              QuicPacketNumberLength packet_number_length,
              QuicVariableLengthIntegerLength retry_token_length_length,
              QuicByteCount retry_token_length,
              QuicVariableLengthIntegerLength length_length);
-  QuicPacket(QuicTransportVersion version,
-             char* buffer,
-             size_t length,
-             bool owns_buffer,
-             const QuicPacketHeader& header);
+  QuicPacket(QuicTransportVersion version, char* buffer, size_t length,
+             bool owns_buffer, const QuicPacketHeader& header);
   QuicPacket(const QuicPacket&) = delete;
   QuicPacket& operator=(const QuicPacket&) = delete;
 
@@ -289,32 +275,20 @@
   // bytes, which causes the default gtest object printer to read
   // uninitialize memory. So we need to teach gtest how to print this object.
   QUIC_EXPORT_PRIVATE friend std::ostream& operator<<(
-      std::ostream& os,
-      const QuicEncryptedPacket& s);
+      std::ostream& os, const QuicEncryptedPacket& s);
 };
 
 // A received encrypted QUIC packet, with a recorded time of receipt.
 class QUIC_EXPORT_PRIVATE QuicReceivedPacket : public QuicEncryptedPacket {
  public:
   QuicReceivedPacket(const char* buffer, size_t length, QuicTime receipt_time);
-  QuicReceivedPacket(const char* buffer,
-                     size_t length,
-                     QuicTime receipt_time,
+  QuicReceivedPacket(const char* buffer, size_t length, QuicTime receipt_time,
                      bool owns_buffer);
-  QuicReceivedPacket(const char* buffer,
-                     size_t length,
-                     QuicTime receipt_time,
-                     bool owns_buffer,
-                     int ttl,
-                     bool ttl_valid);
-  QuicReceivedPacket(const char* buffer,
-                     size_t length,
-                     QuicTime receipt_time,
-                     bool owns_buffer,
-                     int ttl,
-                     bool ttl_valid,
-                     char* packet_headers,
-                     size_t headers_length,
+  QuicReceivedPacket(const char* buffer, size_t length, QuicTime receipt_time,
+                     bool owns_buffer, int ttl, bool ttl_valid);
+  QuicReceivedPacket(const char* buffer, size_t length, QuicTime receipt_time,
+                     bool owns_buffer, int ttl, bool ttl_valid,
+                     char* packet_headers, size_t headers_length,
                      bool owns_header_buffer);
   ~QuicReceivedPacket();
   QuicReceivedPacket(const QuicReceivedPacket&) = delete;
@@ -340,8 +314,7 @@
   // bytes, which causes the default gtest object printer to read
   // uninitialize memory. So we need to teach gtest how to print this object.
   QUIC_EXPORT_PRIVATE friend std::ostream& operator<<(
-      std::ostream& os,
-      const QuicReceivedPacket& s);
+      std::ostream& os, const QuicReceivedPacket& s);
 
  private:
   const QuicTime receipt_time_;
@@ -365,8 +338,7 @@
   SerializedPacket(QuicPacketNumber packet_number,
                    QuicPacketNumberLength packet_number_length,
                    const char* encrypted_buffer,
-                   QuicPacketLength encrypted_length,
-                   bool has_ack,
+                   QuicPacketLength encrypted_length, bool has_ack,
                    bool has_stop_waiting);
 
   // Copy constructor & assignment are deleted. Use |CopySerializedPacket| to
@@ -438,8 +410,7 @@
   std::string ToString() const;
 
   QUIC_EXPORT_PRIVATE friend std::ostream& operator<<(
-      std::ostream& os,
-      const ReceivedPacketInfo& packet_info);
+      std::ostream& os, const ReceivedPacketInfo& packet_info);
 
   const QuicSocketAddress& self_address;
   const QuicSocketAddress& peer_address;
diff --git a/quiche/quic/core/quic_path_validator.h b/quiche/quic/core/quic_path_validator.h
index 5c9c85e..32758a9 100644
--- a/quiche/quic/core/quic_path_validator.h
+++ b/quiche/quic/core/quic_path_validator.h
@@ -56,8 +56,7 @@
 
  private:
   QUIC_EXPORT_PRIVATE friend std::ostream& operator<<(
-      std::ostream& os,
-      const QuicPathValidationContext& context);
+      std::ostream& os, const QuicPathValidationContext& context);
 
   QuicSocketAddress self_address_;
   // The address to send PATH_CHALLENGE.
diff --git a/quiche/quic/core/quic_path_validator_test.cc b/quiche/quic/core/quic_path_validator_test.cc
index a9e0da4..ec2c713 100644
--- a/quiche/quic/core/quic_path_validator_test.cc
+++ b/quiche/quic/core/quic_path_validator_test.cc
@@ -30,19 +30,14 @@
   // Send a PATH_CHALLENGE frame using given path information and populate
   // |data_buffer| with the frame payload. Return true if the validator should
   // move forward in validation, i.e. arm the retry timer.
-  MOCK_METHOD(bool,
-              SendPathChallenge,
-              (const QuicPathFrameBuffer&,
-               const QuicSocketAddress&,
-               const QuicSocketAddress&,
-               const QuicSocketAddress&,
+  MOCK_METHOD(bool, SendPathChallenge,
+              (const QuicPathFrameBuffer&, const QuicSocketAddress&,
+               const QuicSocketAddress&, const QuicSocketAddress&,
                QuicPacketWriter*),
               (override));
 
-  MOCK_METHOD(QuicTime,
-              GetRetryTimeout,
-              (const QuicSocketAddress&, QuicPacketWriter*),
-              (const, override));
+  MOCK_METHOD(QuicTime, GetRetryTimeout,
+              (const QuicSocketAddress&, QuicPacketWriter*), (const, override));
 };
 
 class QuicPathValidatorTest : public QuicTest {
diff --git a/quiche/quic/core/quic_protocol_flags_list.h b/quiche/quic/core/quic_protocol_flags_list.h
index 0a89cd5..20d9a88 100644
--- a/quiche/quic/core/quic_protocol_flags_list.h
+++ b/quiche/quic/core/quic_protocol_flags_list.h
@@ -10,16 +10,12 @@
 #if defined(QUIC_PROTOCOL_FLAG)
 
 QUIC_PROTOCOL_FLAG(
-    bool,
-    quic_allow_chlo_buffering,
-    true,
+    bool, quic_allow_chlo_buffering, true,
     "If true, allows packets to be buffered in anticipation of a "
     "future CHLO, and allow CHLO packets to be buffered until next "
     "iteration of the event loop.")
 
-QUIC_PROTOCOL_FLAG(bool,
-                   quic_disable_pacing_for_perf_tests,
-                   false,
+QUIC_PROTOCOL_FLAG(bool, quic_disable_pacing_for_perf_tests, false,
                    "If true, disable pacing in QUIC")
 
 // Note that single-packet CHLOs are only enforced for Google QUIC versions that
@@ -35,15 +31,11 @@
 //   200 seconds * 1000 qps = 200000.
 // Of course, there are usually many queries per QUIC connection, so we allow a
 // factor of 3 leeway.
-QUIC_PROTOCOL_FLAG(int64_t,
-                   quic_time_wait_list_max_connections,
-                   600000,
+QUIC_PROTOCOL_FLAG(int64_t, quic_time_wait_list_max_connections, 600000,
                    "Maximum number of connections on the time-wait list.  "
                    "A negative value implies no configured limit.")
 
-QUIC_PROTOCOL_FLAG(int64_t,
-                   quic_time_wait_list_seconds,
-                   200,
+QUIC_PROTOCOL_FLAG(int64_t, quic_time_wait_list_seconds, 200,
                    "Time period for which a given connection_id should live in "
                    "the time-wait state.")
 
@@ -67,36 +59,26 @@
     uint64_t, quic_recent_stateless_reset_addresses_lifetime_ms, 1000,
     "Max time that a client address lives in recent reset addresses set.")
 
-QUIC_PROTOCOL_FLAG(double,
-                   quic_bbr_cwnd_gain,
-                   2.0f,
+QUIC_PROTOCOL_FLAG(double, quic_bbr_cwnd_gain, 2.0f,
                    "Congestion window gain for QUIC BBR during PROBE_BW phase.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_buffered_data_threshold,
-    8 * 1024,
+    int32_t, quic_buffered_data_threshold, 8 * 1024,
     "If buffered data in QUIC stream is less than this "
     "threshold, buffers all provided data or asks upper layer for more data")
 
 QUIC_PROTOCOL_FLAG(
-    uint64_t,
-    quic_send_buffer_max_data_slice_size,
-    4 * 1024,
+    uint64_t, quic_send_buffer_max_data_slice_size, 4 * 1024,
     "Max size of data slice in bytes for QUIC stream send buffer.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_lumpy_pacing_size,
-    2,
+    int32_t, quic_lumpy_pacing_size, 2,
     "Number of packets that the pacing sender allows in bursts during "
     "pacing. This flag is ignored if a flow's estimated bandwidth is "
     "lower than 1200 kbps.")
 
 QUIC_PROTOCOL_FLAG(
-    double,
-    quic_lumpy_pacing_cwnd_fraction,
-    0.25f,
+    double, quic_lumpy_pacing_cwnd_fraction, 0.25f,
     "Congestion window fraction that the pacing sender allows in bursts "
     "during pacing.")
 
@@ -105,183 +87,130 @@
     "The minimum estimated client bandwidth below which the pacing sender will "
     "not allow bursts.")
 
-QUIC_PROTOCOL_FLAG(int32_t,
-                   quic_max_pace_time_into_future_ms,
-                   10,
+QUIC_PROTOCOL_FLAG(int32_t, quic_max_pace_time_into_future_ms, 10,
                    "Max time that QUIC can pace packets into the future in ms.")
 
 QUIC_PROTOCOL_FLAG(
-    double,
-    quic_pace_time_into_future_srtt_fraction,
+    double, quic_pace_time_into_future_srtt_fraction,
     0.125f,  // One-eighth smoothed RTT
     "Smoothed RTT fraction that a connection can pace packets into the future.")
 
-QUIC_PROTOCOL_FLAG(bool,
-                   quic_export_write_path_stats_at_server,
-                   false,
+QUIC_PROTOCOL_FLAG(bool, quic_export_write_path_stats_at_server, false,
                    "If true, export detailed write path statistics at server.")
 
-QUIC_PROTOCOL_FLAG(bool,
-                   quic_disable_version_negotiation_grease_randomness,
+QUIC_PROTOCOL_FLAG(bool, quic_disable_version_negotiation_grease_randomness,
                    false,
                    "If true, use predictable version negotiation versions.")
 
-QUIC_PROTOCOL_FLAG(bool,
-                   quic_enable_http3_grease_randomness,
-                   true,
+QUIC_PROTOCOL_FLAG(bool, quic_enable_http3_grease_randomness, true,
                    "If true, use random greased settings and frames.")
 
 QUIC_PROTOCOL_FLAG(
     bool, quic_enable_chaos_protection, true,
     "If true, use chaos protection to randomize client initials.")
 
-QUIC_PROTOCOL_FLAG(int64_t,
-                   quic_max_tracked_packet_count,
-                   10000,
+QUIC_PROTOCOL_FLAG(int64_t, quic_max_tracked_packet_count, 10000,
                    "Maximum number of tracked packets.")
 
 QUIC_PROTOCOL_FLAG(
-    bool,
-    quic_client_convert_http_header_name_to_lowercase,
-    true,
+    bool, quic_client_convert_http_header_name_to_lowercase, true,
     "If true, HTTP request header names sent from QuicSpdyClientBase(and "
     "descendents) will be automatically converted to lower case.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_bbr2_default_probe_bw_base_duration_ms,
-    2000,
+    int32_t, quic_bbr2_default_probe_bw_base_duration_ms, 2000,
     "The default minimum duration for BBRv2-native probes, in milliseconds.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_bbr2_default_probe_bw_max_rand_duration_ms,
-    1000,
+    int32_t, quic_bbr2_default_probe_bw_max_rand_duration_ms, 1000,
     "The default upper bound of the random amount of BBRv2-native "
     "probes, in milliseconds.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_bbr2_default_probe_rtt_period_ms,
-    10000,
+    int32_t, quic_bbr2_default_probe_rtt_period_ms, 10000,
     "The default period for entering PROBE_RTT, in milliseconds.")
 
 QUIC_PROTOCOL_FLAG(
-    double,
-    quic_bbr2_default_loss_threshold,
-    0.02,
+    double, quic_bbr2_default_loss_threshold, 0.02,
     "The default loss threshold for QUIC BBRv2, should be a value "
     "between 0 and 1.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_bbr2_default_startup_full_loss_count,
-    8,
+    int32_t, quic_bbr2_default_startup_full_loss_count, 8,
     "The default minimum number of loss marking events to exit STARTUP.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_bbr2_default_probe_bw_full_loss_count,
-    2,
+    int32_t, quic_bbr2_default_probe_bw_full_loss_count, 2,
     "The default minimum number of loss marking events to exit PROBE_UP phase.")
 
 QUIC_PROTOCOL_FLAG(
-    double,
-    quic_bbr2_default_inflight_hi_headroom,
-    0.15,
+    double, quic_bbr2_default_inflight_hi_headroom, 0.15,
     "The default fraction of unutilized headroom to try to leave in path "
     "upon high loss.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_bbr2_default_initial_ack_height_filter_window,
-    10,
+    int32_t, quic_bbr2_default_initial_ack_height_filter_window, 10,
     "The default initial value of the max ack height filter's window length.")
 
 QUIC_PROTOCOL_FLAG(
-    double,
-    quic_ack_aggregation_bandwidth_threshold,
-    1.0,
+    double, quic_ack_aggregation_bandwidth_threshold, 1.0,
     "If the bandwidth during ack aggregation is smaller than (estimated "
     "bandwidth * this flag), consider the current aggregation completed "
     "and starts a new one.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_anti_amplification_factor,
-    3,
+    int32_t, quic_anti_amplification_factor, 3,
     "Anti-amplification factor. Before address validation, server will "
     "send no more than factor times bytes received.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_max_buffered_crypto_bytes,
+    int32_t, quic_max_buffered_crypto_bytes,
     16 * 1024,  // 16 KB
     "The maximum amount of CRYPTO frame data that can be buffered.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_max_aggressive_retransmittable_on_wire_ping_count,
-    5,
+    int32_t, quic_max_aggressive_retransmittable_on_wire_ping_count, 5,
     "Maximum number of consecutive pings that can be sent with the "
     "aggressive initial retransmittable on the wire timeout if there is "
     "no new stream data received. After this limit, the timeout will be "
     "doubled each ping until it exceeds the default ping timeout.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_max_retransmittable_on_wire_ping_count,
-    1000,
+    int32_t, quic_max_retransmittable_on_wire_ping_count, 1000,
     "Maximum number of pings that can be sent with the retransmittable "
     "on the wire timeout, over the lifetime of a connection. After this "
     "limit, the timeout will be the default ping timeout.")
 
-QUIC_PROTOCOL_FLAG(int32_t,
-                   quic_max_congestion_window,
-                   2000,
+QUIC_PROTOCOL_FLAG(int32_t, quic_max_congestion_window, 2000,
                    "The maximum congestion window in packets.")
 
 QUIC_PROTOCOL_FLAG(
-    int32_t,
-    quic_max_streams_window_divisor,
-    2,
+    int32_t, quic_max_streams_window_divisor, 2,
     "The divisor that controls how often MAX_STREAMS frame is sent.")
 
 QUIC_PROTOCOL_FLAG(
-    uint64_t,
-    quic_key_update_confidentiality_limit,
-    0,
+    uint64_t, quic_key_update_confidentiality_limit, 0,
     "If non-zero and key update is allowed, the maximum number of "
     "packets sent for each key phase before initiating a key update.")
 
-QUIC_PROTOCOL_FLAG(bool,
-                   quic_disable_client_tls_zero_rtt,
-                   false,
+QUIC_PROTOCOL_FLAG(bool, quic_disable_client_tls_zero_rtt, false,
                    "If true, QUIC client with TLS will not try 0-RTT.")
 
-QUIC_PROTOCOL_FLAG(bool,
-                   quic_disable_server_tls_resumption,
-                   false,
+QUIC_PROTOCOL_FLAG(bool, quic_disable_server_tls_resumption, false,
                    "If true, QUIC server will disable TLS resumption by not "
                    "issuing or processing session tickets.")
 
-QUIC_PROTOCOL_FLAG(bool,
-                   quic_defer_send_in_response,
-                   true,
+QUIC_PROTOCOL_FLAG(bool, quic_defer_send_in_response, true,
                    "If true, QUIC servers will defer sending in response to "
                    "incoming packets by default.")
 
 QUIC_PROTOCOL_FLAG(
-    bool,
-    quic_header_size_limit_includes_overhead,
-    true,
+    bool, quic_header_size_limit_includes_overhead, true,
     "If true, QUIC QPACK decoder includes 32-bytes overheader per entry while "
     "comparing request/response header size against its upper limit.")
 
 QUIC_PROTOCOL_FLAG(
-    bool,
-    quic_reject_retry_token_in_initial_packet,
-    false,
+    bool, quic_reject_retry_token_in_initial_packet, false,
     "If true, always reject retry_token received in INITIAL packets")
 
 QUIC_PROTOCOL_FLAG(bool, quic_use_lower_server_response_mtu_for_test, false,
diff --git a/quiche/quic/core/quic_received_packet_manager.cc b/quiche/quic/core/quic_received_packet_manager.cc
index f8bcb13..213f6ba 100644
--- a/quiche/quic/core/quic_received_packet_manager.cc
+++ b/quiche/quic/core/quic_received_packet_manager.cc
@@ -70,8 +70,7 @@
 }
 
 void QuicReceivedPacketManager::RecordPacketReceived(
-    const QuicPacketHeader& header,
-    QuicTime receipt_time) {
+    const QuicPacketHeader& header, QuicTime receipt_time) {
   const QuicPacketNumber packet_number = header.packet_number;
   QUICHE_DCHECK(IsAwaitingPacket(packet_number))
       << " packet_number:" << packet_number;
@@ -171,7 +170,7 @@
   QuicFrame frame = QuicFrame(&ack_frame_);
   frame.delete_forbidden = true;
   return frame;
-#else  // QUIC_FRAME_DEBUG
+#else   // QUIC_FRAME_DEBUG
   return QuicFrame(&ack_frame_);
 #endif  // QUIC_FRAME_DEBUG
 }
diff --git a/quiche/quic/core/quic_received_packet_manager.h b/quiche/quic/core/quic_received_packet_manager.h
index cf08f22..d13e09b 100644
--- a/quiche/quic/core/quic_received_packet_manager.h
+++ b/quiche/quic/core/quic_received_packet_manager.h
@@ -6,6 +6,7 @@
 #define QUICHE_QUIC_CORE_QUIC_RECEIVED_PACKET_MANAGER_H_
 
 #include <cstddef>
+
 #include "quiche/quic/core/frames/quic_ack_frequency_frame.h"
 #include "quiche/quic/core/quic_config.h"
 #include "quiche/quic/core/quic_framer.h"
diff --git a/quiche/quic/core/quic_sent_packet_manager.cc b/quiche/quic/core/quic_sent_packet_manager.cc
index d91613f..47377e1 100644
--- a/quiche/quic/core/quic_sent_packet_manager.cc
+++ b/quiche/quic/core/quic_sent_packet_manager.cc
@@ -464,11 +464,8 @@
 }
 
 void QuicSentPacketManager::PostProcessNewlyAckedPackets(
-    QuicPacketNumber ack_packet_number,
-    EncryptionLevel ack_decrypted_level,
-    const QuicAckFrame& ack_frame,
-    QuicTime ack_receive_time,
-    bool rtt_updated,
+    QuicPacketNumber ack_packet_number, EncryptionLevel ack_decrypted_level,
+    const QuicAckFrame& ack_frame, QuicTime ack_receive_time, bool rtt_updated,
     QuicByteCount prior_bytes_in_flight) {
   unacked_packets_.NotifyAggregatedStreamFrameAcked(
       last_ack_frame_.ack_delay_time);
@@ -532,9 +529,7 @@
 }
 
 void QuicSentPacketManager::MaybeInvokeCongestionEvent(
-    bool rtt_updated,
-    QuicByteCount prior_in_flight,
-    QuicTime event_time) {
+    bool rtt_updated, QuicByteCount prior_in_flight, QuicTime event_time) {
   if (!rtt_updated && packets_acked_.empty() && packets_lost_.empty()) {
     return;
   }
@@ -682,8 +677,7 @@
 }
 
 void QuicSentPacketManager::MarkForRetransmission(
-    QuicPacketNumber packet_number,
-    TransmissionType transmission_type) {
+    QuicPacketNumber packet_number, TransmissionType transmission_type) {
   QuicTransmissionInfo* transmission_info =
       unacked_packets_.GetMutableTransmissionInfo(packet_number);
   // A previous RTO retransmission may cause connection close; packets without
@@ -842,11 +836,9 @@
 }
 
 bool QuicSentPacketManager::OnPacketSent(
-    SerializedPacket* mutable_packet,
-    QuicTime sent_time,
+    SerializedPacket* mutable_packet, QuicTime sent_time,
     TransmissionType transmission_type,
-    HasRetransmittableData has_retransmittable_data,
-    bool measure_rtt) {
+    HasRetransmittableData has_retransmittable_data, bool measure_rtt) {
   const SerializedPacket& packet = *mutable_packet;
   QuicPacketNumber packet_number = packet.packet_number;
   QUICHE_DCHECK_LE(FirstSendingPacketNumber(), packet_number);
@@ -1641,8 +1633,7 @@
 }
 
 AckResult QuicSentPacketManager::OnAckFrameEnd(
-    QuicTime ack_receive_time,
-    QuicPacketNumber ack_packet_number,
+    QuicTime ack_receive_time, QuicPacketNumber ack_packet_number,
     EncryptionLevel ack_decrypted_level) {
   QuicByteCount prior_bytes_in_flight = unacked_packets_.bytes_in_flight();
   // Reverse packets_acked_ so that it is in ascending order.
diff --git a/quiche/quic/core/quic_sent_packet_manager.h b/quiche/quic/core/quic_sent_packet_manager.h
index 4be38bb..a476f41 100644
--- a/quiche/quic/core/quic_sent_packet_manager.h
+++ b/quiche/quic/core/quic_sent_packet_manager.h
@@ -62,8 +62,7 @@
 
     // Called when a spurious retransmission is detected.
     virtual void OnSpuriousPacketRetransmission(
-        TransmissionType /*transmission_type*/,
-        QuicByteCount /*byte_size*/) {}
+        TransmissionType /*transmission_type*/, QuicByteCount /*byte_size*/) {}
 
     virtual void OnIncomingAck(QuicPacketNumber /*ack_packet_number*/,
                                EncryptionLevel /*ack_decrypted_level*/,
@@ -125,10 +124,8 @@
     PTO_MODE,
   };
 
-  QuicSentPacketManager(Perspective perspective,
-                        const QuicClock* clock,
-                        QuicRandom* random,
-                        QuicConnectionStats* stats,
+  QuicSentPacketManager(Perspective perspective, const QuicClock* clock,
+                        QuicRandom* random, QuicConnectionStats* stats,
                         CongestionControlType congestion_control_type);
   QuicSentPacketManager(const QuicSentPacketManager&) = delete;
   QuicSentPacketManager& operator=(const QuicSentPacketManager&) = delete;
@@ -210,8 +207,7 @@
   // the number of bytes sent and if they were retransmitted and if this packet
   // is used for rtt measuring.  Returns true if the sender should reset the
   // retransmission timer.
-  bool OnPacketSent(SerializedPacket* mutable_packet,
-                    QuicTime sent_time,
+  bool OnPacketSent(SerializedPacket* mutable_packet, QuicTime sent_time,
                     TransmissionType transmission_type,
                     HasRetransmittableData has_retransmittable_data,
                     bool measure_rtt);
@@ -550,8 +546,7 @@
   // Removes the retransmittability and in flight properties from the packet at
   // |info| due to receipt by the peer.
   void MarkPacketHandled(QuicPacketNumber packet_number,
-                         QuicTransmissionInfo* info,
-                         QuicTime ack_receive_time,
+                         QuicTransmissionInfo* info, QuicTime ack_receive_time,
                          QuicTime::Delta ack_delay_time,
                          QuicTime receive_timestamp);
 
@@ -566,8 +561,7 @@
   void PostProcessNewlyAckedPackets(QuicPacketNumber ack_packet_number,
                                     EncryptionLevel ack_decrypted_level,
                                     const QuicAckFrame& ack_frame,
-                                    QuicTime ack_receive_time,
-                                    bool rtt_updated,
+                                    QuicTime ack_receive_time, bool rtt_updated,
                                     QuicByteCount prior_bytes_in_flight);
 
   // Notify observers that packet with QuicTransmissionInfo |info| is a spurious
diff --git a/quiche/quic/core/quic_server_id.cc b/quiche/quic/core/quic_server_id.cc
index 9f61072..3618e96 100644
--- a/quiche/quic/core/quic_server_id.cc
+++ b/quiche/quic/core/quic_server_id.cc
@@ -14,8 +14,7 @@
 QuicServerId::QuicServerId(const std::string& host, uint16_t port)
     : QuicServerId(host, port, false) {}
 
-QuicServerId::QuicServerId(const std::string& host,
-                           uint16_t port,
+QuicServerId::QuicServerId(const std::string& host, uint16_t port,
                            bool privacy_mode_enabled)
     : host_(host), port_(port), privacy_mode_enabled_(privacy_mode_enabled) {}
 
diff --git a/quiche/quic/core/quic_server_id.h b/quiche/quic/core/quic_server_id.h
index 8f437d1..7f226fd 100644
--- a/quiche/quic/core/quic_server_id.h
+++ b/quiche/quic/core/quic_server_id.h
@@ -19,8 +19,7 @@
  public:
   QuicServerId();
   QuicServerId(const std::string& host, uint16_t port);
-  QuicServerId(const std::string& host,
-               uint16_t port,
+  QuicServerId(const std::string& host, uint16_t port,
                bool privacy_mode_enabled);
   ~QuicServerId();
 
diff --git a/quiche/quic/core/quic_session.cc b/quiche/quic/core/quic_session.cc
index 4d89cdd..8868fc5 100644
--- a/quiche/quic/core/quic_session.cc
+++ b/quiche/quic/core/quic_session.cc
@@ -491,7 +491,7 @@
   if (is_connectivity_probe && perspective() == Perspective::IS_SERVER) {
     // Server only sends back a connectivity probe after received a
     // connectivity probe from a new peer address.
-      connection_->SendConnectivityProbingPacket(nullptr, peer_address);
+    connection_->SendConnectivityProbingPacket(nullptr, peer_address);
   }
 }
 
diff --git a/quiche/quic/core/quic_session_test.cc b/quiche/quic/core/quic_session_test.cc
index d97200e..ddda101 100644
--- a/quiche/quic/core/quic_session_test.cc
+++ b/quiche/quic/core/quic_session_test.cc
@@ -160,12 +160,8 @@
   void SetServerApplicationStateForResumption(
       std::unique_ptr<ApplicationState> /*application_state*/) override {}
   MOCK_METHOD(std::unique_ptr<QuicDecrypter>,
-              AdvanceKeysAndCreateCurrentOneRttDecrypter,
-              (),
-              (override));
-  MOCK_METHOD(std::unique_ptr<QuicEncrypter>,
-              CreateCurrentOneRttEncrypter,
-              (),
+              AdvanceKeysAndCreateCurrentOneRttDecrypter, (), (override));
+  MOCK_METHOD(std::unique_ptr<QuicEncrypter>, CreateCurrentOneRttEncrypter, (),
               (override));
 
   MOCK_METHOD(void, OnCanWrite, (), (override));
@@ -198,9 +194,7 @@
   TestStream(QuicStreamId id, QuicSession* session, StreamType type)
       : TestStream(id, session, /*is_static=*/false, type) {}
 
-  TestStream(QuicStreamId id,
-             QuicSession* session,
-             bool is_static,
+  TestStream(QuicStreamId id, QuicSession* session, bool is_static,
              StreamType type)
       : QuicStream(id, session, is_static, type) {}
 
@@ -213,8 +207,7 @@
   void OnDataAvailable() override {}
 
   MOCK_METHOD(void, OnCanWrite, (), (override));
-  MOCK_METHOD(bool,
-              RetransmitStreamData,
+  MOCK_METHOD(bool, RetransmitStreamData,
               (QuicStreamOffset, QuicByteCount, bool, TransmissionType),
               (override));
 
@@ -225,9 +218,7 @@
  public:
   explicit TestSession(QuicConnection* connection,
                        MockQuicSessionVisitor* session_visitor)
-      : QuicSession(connection,
-                    session_visitor,
-                    DefaultQuicConfig(),
+      : QuicSession(connection, session_visitor, DefaultQuicConfig(),
                     CurrentSupportedVersions(),
                     /*num_expected_unidirectional_static_streams = */ 0),
         crypto_stream_(this),
@@ -342,9 +333,7 @@
     return consumed;
   }
 
-  MOCK_METHOD(void,
-              OnCanCreateNewOutgoingStream,
-              (bool unidirectional),
+  MOCK_METHOD(void, OnCanCreateNewOutgoingStream, (bool unidirectional),
               (override));
 
   void set_writev_consumes_all_data(bool val) {
@@ -443,11 +432,9 @@
 class QuicSessionTestBase : public QuicTestWithParam<ParsedQuicVersion> {
  protected:
   QuicSessionTestBase(Perspective perspective, bool configure_session)
-      : connection_(
-            new StrictMock<MockQuicConnection>(&helper_,
-                                               &alarm_factory_,
-                                               perspective,
-                                               SupportedVersions(GetParam()))),
+      : connection_(new StrictMock<MockQuicConnection>(
+            &helper_, &alarm_factory_, perspective,
+            SupportedVersions(GetParam()))),
         session_(connection_, &session_visitor_),
         configure_session_(configure_session) {
     session_.config()->SetInitialStreamFlowControlWindowToSend(
@@ -580,8 +567,7 @@
   }
 
   QuicStreamId StreamCountToId(QuicStreamCount stream_count,
-                               Perspective perspective,
-                               bool bidirectional) {
+                               Perspective perspective, bool bidirectional) {
     // Calculate and build up stream ID rather than use
     // GetFirst... because tests that rely on this method
     // needs to do the stream count where #1 is 0/1/2/3, and not
@@ -610,8 +596,7 @@
  public:
   // CheckMultiPathResponse validates that a written packet
   // contains both expected path responses.
-  WriteResult CheckMultiPathResponse(const char* buffer,
-                                     size_t buf_len,
+  WriteResult CheckMultiPathResponse(const char* buffer, size_t buf_len,
                                      const QuicIpAddress& /*self_address*/,
                                      const QuicSocketAddress& /*peer_address*/,
                                      PerPacketOptions* /*options*/) {
@@ -646,10 +631,8 @@
       : QuicSessionTestBase(Perspective::IS_SERVER, /*configure_session=*/true),
         path_frame_buffer1_({0, 1, 2, 3, 4, 5, 6, 7}),
         path_frame_buffer2_({8, 9, 10, 11, 12, 13, 14, 15}),
-        client_framer_(SupportedVersions(GetParam()),
-                       QuicTime::Zero(),
-                       Perspective::IS_CLIENT,
-                       kQuicDefaultConnectionIdLength) {
+        client_framer_(SupportedVersions(GetParam()), QuicTime::Zero(),
+                       Perspective::IS_CLIENT, kQuicDefaultConnectionIdLength) {
     client_framer_.set_visitor(&framer_visitor_);
     client_framer_.SetInitialObfuscators(TestConnectionId());
     if (client_framer_.version().KnowsWhichDecrypterToUse()) {
@@ -666,8 +649,7 @@
   QuicFramer client_framer_;
 };
 
-INSTANTIATE_TEST_SUITE_P(Tests,
-                         QuicSessionTestServer,
+INSTANTIATE_TEST_SUITE_P(Tests, QuicSessionTestServer,
                          ::testing::ValuesIn(AllSupportedVersions()),
                          ::testing::PrintToStringParamName());
 
@@ -1425,10 +1407,10 @@
   EXPECT_CALL(*writer, WritePacket(_, _, _, new_peer_address, _))
       .WillOnce(Return(WriteResult(WRITE_STATUS_OK, 0)));
 
-    EXPECT_CALL(*connection_, SendConnectivityProbingPacket(_, _))
-        .WillOnce(
-            Invoke(connection_,
-                   &MockQuicConnection::ReallySendConnectivityProbingPacket));
+  EXPECT_CALL(*connection_, SendConnectivityProbingPacket(_, _))
+      .WillOnce(
+          Invoke(connection_,
+                 &MockQuicConnection::ReallySendConnectivityProbingPacket));
   session_.OnPacketReceived(session_.self_address(), new_peer_address,
                             /*is_connectivity_probe=*/true);
   EXPECT_EQ(old_peer_address, session_.peer_address());
@@ -2062,8 +2044,7 @@
                             /*configure_session=*/true) {}
 };
 
-INSTANTIATE_TEST_SUITE_P(Tests,
-                         QuicSessionTestClient,
+INSTANTIATE_TEST_SUITE_P(Tests, QuicSessionTestClient,
                          ::testing::ValuesIn(AllSupportedVersions()),
                          ::testing::PrintToStringParamName());
 
@@ -3058,8 +3039,7 @@
                             /*configure_session=*/false) {}
 };
 
-INSTANTIATE_TEST_SUITE_P(Tests,
-                         QuicSessionTestClientUnconfigured,
+INSTANTIATE_TEST_SUITE_P(Tests, QuicSessionTestClientUnconfigured,
                          ::testing::ValuesIn(AllSupportedVersions()),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/quic_stream_frame_data_producer.h b/quiche/quic/core/quic_stream_frame_data_producer.h
index 886c875..5dc12b7 100644
--- a/quiche/quic/core/quic_stream_frame_data_producer.h
+++ b/quiche/quic/core/quic_stream_frame_data_producer.h
@@ -28,8 +28,7 @@
   // Writes the data for a CRYPTO frame to |writer| for a frame at encryption
   // level |level| starting at offset |offset| for |data_length| bytes. Returns
   // whether writing the data was successful.
-  virtual bool WriteCryptoData(EncryptionLevel level,
-                               QuicStreamOffset offset,
+  virtual bool WriteCryptoData(EncryptionLevel level, QuicStreamOffset offset,
                                QuicByteCount data_length,
                                QuicDataWriter* writer) = 0;
 };
diff --git a/quiche/quic/core/quic_stream_id_manager.cc b/quiche/quic/core/quic_stream_id_manager.cc
index 04d93bb..31ce3e8 100644
--- a/quiche/quic/core/quic_stream_id_manager.cc
+++ b/quiche/quic/core/quic_stream_id_manager.cc
@@ -22,11 +22,8 @@
   (perspective_ == Perspective::IS_SERVER ? " Server: " : " Client: ")
 
 QuicStreamIdManager::QuicStreamIdManager(
-    DelegateInterface* delegate,
-    bool unidirectional,
-    Perspective perspective,
-    ParsedQuicVersion version,
-    QuicStreamCount max_allowed_outgoing_streams,
+    DelegateInterface* delegate, bool unidirectional, Perspective perspective,
+    ParsedQuicVersion version, QuicStreamCount max_allowed_outgoing_streams,
     QuicStreamCount max_allowed_incoming_streams)
     : delegate_(delegate),
       unidirectional_(unidirectional),
@@ -45,8 +42,7 @@
 QuicStreamIdManager::~QuicStreamIdManager() {}
 
 bool QuicStreamIdManager::OnStreamsBlockedFrame(
-    const QuicStreamsBlockedFrame& frame,
-    std::string* error_details) {
+    const QuicStreamsBlockedFrame& frame, std::string* error_details) {
   QUICHE_DCHECK_EQ(frame.unidirectional, unidirectional_);
   if (frame.stream_count > incoming_advertised_max_streams_) {
     // Peer thinks it can send more streams that we've told it.
@@ -156,8 +152,7 @@
 }
 
 bool QuicStreamIdManager::MaybeIncreaseLargestPeerStreamId(
-    const QuicStreamId stream_id,
-    std::string* error_details) {
+    const QuicStreamId stream_id, std::string* error_details) {
   // |stream_id| must be an incoming stream of the right directionality.
   QUICHE_DCHECK_NE(QuicUtils::IsBidirectionalStreamId(stream_id, version_),
                    unidirectional_);
diff --git a/quiche/quic/core/quic_stream_id_manager.h b/quiche/quic/core/quic_stream_id_manager.h
index 33d7566..eaad296 100644
--- a/quiche/quic/core/quic_stream_id_manager.h
+++ b/quiche/quic/core/quic_stream_id_manager.h
@@ -30,10 +30,8 @@
                                 bool unidirectional) = 0;
   };
 
-  QuicStreamIdManager(DelegateInterface* delegate,
-                      bool unidirectional,
-                      Perspective perspective,
-                      ParsedQuicVersion version,
+  QuicStreamIdManager(DelegateInterface* delegate, bool unidirectional,
+                      Perspective perspective, ParsedQuicVersion version,
                       QuicStreamCount max_allowed_outgoing_streams,
                       QuicStreamCount max_allowed_incoming_streams);
 
diff --git a/quiche/quic/core/quic_stream_id_manager_test.cc b/quiche/quic/core/quic_stream_id_manager_test.cc
index a9b3e6f..c0cab1d 100644
--- a/quiche/quic/core/quic_stream_id_manager_test.cc
+++ b/quiche/quic/core/quic_stream_id_manager_test.cc
@@ -24,15 +24,12 @@
 
 class MockDelegate : public QuicStreamIdManager::DelegateInterface {
  public:
-  MOCK_METHOD(void,
-              SendMaxStreams,
-              (QuicStreamCount stream_count, bool unidirectional),
-              (override));
+  MOCK_METHOD(void, SendMaxStreams,
+              (QuicStreamCount stream_count, bool unidirectional), (override));
 };
 
 struct TestParams {
-  TestParams(ParsedQuicVersion version,
-             Perspective perspective,
+  TestParams(ParsedQuicVersion version, Perspective perspective,
              bool is_unidirectional)
       : version(version),
         perspective(perspective),
@@ -70,11 +67,8 @@
 class QuicStreamIdManagerTest : public QuicTestWithParam<TestParams> {
  protected:
   QuicStreamIdManagerTest()
-      : stream_id_manager_(&delegate_,
-                           IsUnidirectional(),
-                           perspective(),
-                           GetParam().version,
-                           0,
+      : stream_id_manager_(&delegate_, IsUnidirectional(), perspective(),
+                           GetParam().version, 0,
                            kDefaultMaxStreamsPerConnection) {
     QUICHE_DCHECK(VersionHasIetfQuicFrames(transport_version()));
   }
@@ -103,8 +97,7 @@
   QuicStreamIdManager stream_id_manager_;
 };
 
-INSTANTIATE_TEST_SUITE_P(Tests,
-                         QuicStreamIdManagerTest,
+INSTANTIATE_TEST_SUITE_P(Tests, QuicStreamIdManagerTest,
                          ::testing::ValuesIn(GetTestParams()),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/quic_stream_send_buffer.cc b/quiche/quic/core/quic_stream_send_buffer.cc
index 21decfd..c7eb188 100644
--- a/quiche/quic/core/quic_stream_send_buffer.cc
+++ b/quiche/quic/core/quic_stream_send_buffer.cc
@@ -146,8 +146,7 @@
 }
 
 bool QuicStreamSendBuffer::OnStreamDataAcked(
-    QuicStreamOffset offset,
-    QuicByteCount data_length,
+    QuicStreamOffset offset, QuicByteCount data_length,
     QuicByteCount* newly_acked_length) {
   *newly_acked_length = 0;
   if (data_length == 0) {
@@ -212,8 +211,7 @@
 }
 
 void QuicStreamSendBuffer::OnStreamDataRetransmitted(
-    QuicStreamOffset offset,
-    QuicByteCount data_length) {
+    QuicStreamOffset offset, QuicByteCount data_length) {
   if (data_length == 0) {
     return;
   }
@@ -285,14 +283,11 @@
 }
 
 bool QuicStreamSendBuffer::IsStreamDataOutstanding(
-    QuicStreamOffset offset,
-    QuicByteCount data_length) const {
+    QuicStreamOffset offset, QuicByteCount data_length) const {
   return data_length > 0 &&
          !bytes_acked_.Contains(offset, offset + data_length);
 }
 
-size_t QuicStreamSendBuffer::size() const {
-  return interval_deque_.Size();
-}
+size_t QuicStreamSendBuffer::size() const { return interval_deque_.Size(); }
 
 }  // namespace quic
diff --git a/quiche/quic/core/quic_stream_send_buffer.h b/quiche/quic/core/quic_stream_send_buffer.h
index c763c19..b74968a 100644
--- a/quiche/quic/core/quic_stream_send_buffer.h
+++ b/quiche/quic/core/quic_stream_send_buffer.h
@@ -81,15 +81,13 @@
   void OnStreamDataConsumed(size_t bytes_consumed);
 
   // Write |data_length| of data starts at |offset|.
-  bool WriteStreamData(QuicStreamOffset offset,
-                       QuicByteCount data_length,
+  bool WriteStreamData(QuicStreamOffset offset, QuicByteCount data_length,
                        QuicDataWriter* writer);
 
   // Called when data [offset, offset + data_length) is acked or removed as
   // stream is canceled. Removes fully acked data slice from send buffer. Set
   // |newly_acked_length|. Returns false if trying to ack unsent data.
-  bool OnStreamDataAcked(QuicStreamOffset offset,
-                         QuicByteCount data_length,
+  bool OnStreamDataAcked(QuicStreamOffset offset, QuicByteCount data_length,
                          QuicByteCount* newly_acked_length);
 
   // Called when data [offset, offset + data_length) is considered as lost.
diff --git a/quiche/quic/core/quic_stream_sequencer.cc b/quiche/quic/core/quic_stream_sequencer.cc
index 61eec53..03fd990 100644
--- a/quiche/quic/core/quic_stream_sequencer.cc
+++ b/quiche/quic/core/quic_stream_sequencer.cc
@@ -247,9 +247,7 @@
   stream_->AddBytesConsumed(num_bytes_consumed);
 }
 
-void QuicStreamSequencer::SetBlockedUntilFlush() {
-  blocked_ = true;
-}
+void QuicStreamSequencer::SetBlockedUntilFlush() { blocked_ = true; }
 
 void QuicStreamSequencer::SetUnblocked() {
   blocked_ = false;
diff --git a/quiche/quic/core/quic_stream_sequencer.h b/quiche/quic/core/quic_stream_sequencer.h
index 0e8d2d2..e201cc1 100644
--- a/quiche/quic/core/quic_stream_sequencer.h
+++ b/quiche/quic/core/quic_stream_sequencer.h
@@ -177,8 +177,7 @@
   void MaybeCloseStream();
 
   // Shared implementation between OnStreamFrame and OnCryptoFrame.
-  void OnFrameData(QuicStreamOffset byte_offset,
-                   size_t data_len,
+  void OnFrameData(QuicStreamOffset byte_offset, size_t data_len,
                    const char* data_buffer);
 
   // The stream which owns this sequencer.
diff --git a/quiche/quic/core/quic_stream_sequencer_buffer.cc b/quiche/quic/core/quic_stream_sequencer_buffer.cc
index 9f7e0c9..d364d61 100644
--- a/quiche/quic/core/quic_stream_sequencer_buffer.cc
+++ b/quiche/quic/core/quic_stream_sequencer_buffer.cc
@@ -50,9 +50,7 @@
   Clear();
 }
 
-QuicStreamSequencerBuffer::~QuicStreamSequencerBuffer() {
-  Clear();
-}
+QuicStreamSequencerBuffer::~QuicStreamSequencerBuffer() { Clear(); }
 
 void QuicStreamSequencerBuffer::Clear() {
   if (blocks_ != nullptr) {
@@ -109,10 +107,8 @@
 }
 
 QuicErrorCode QuicStreamSequencerBuffer::OnStreamData(
-    QuicStreamOffset starting_offset,
-    absl::string_view data,
-    size_t* const bytes_buffered,
-    std::string* error_details) {
+    QuicStreamOffset starting_offset, absl::string_view data,
+    size_t* const bytes_buffered, std::string* error_details) {
   *bytes_buffered = 0;
   size_t size = data.size();
   if (size == 0) {
diff --git a/quiche/quic/core/quic_stream_sequencer_buffer.h b/quiche/quic/core/quic_stream_sequencer_buffer.h
index c4aaa0a..4540db1 100644
--- a/quiche/quic/core/quic_stream_sequencer_buffer.h
+++ b/quiche/quic/core/quic_stream_sequencer_buffer.h
@@ -106,17 +106,14 @@
   // Called to buffer new data received for this stream.  If the data was
   // successfully buffered, returns QUIC_NO_ERROR and stores the number of
   // bytes buffered in |bytes_buffered|. Returns an error otherwise.
-  QuicErrorCode OnStreamData(QuicStreamOffset offset,
-                             absl::string_view data,
+  QuicErrorCode OnStreamData(QuicStreamOffset offset, absl::string_view data,
                              size_t* bytes_buffered,
                              std::string* error_details);
 
   // Reads from this buffer into given iovec array, up to number of iov_len
   // iovec objects and returns the number of bytes read.
-  QuicErrorCode Readv(const struct iovec* dest_iov,
-                      size_t dest_count,
-                      size_t* bytes_read,
-                      std::string* error_details);
+  QuicErrorCode Readv(const struct iovec* dest_iov, size_t dest_count,
+                      size_t* bytes_read, std::string* error_details);
 
   // Returns the readable region of valid data in iovec format. The readable
   // region is the buffer region where there is valid data not yet read by
@@ -167,10 +164,8 @@
 
   // Copies |data| to blocks_, sets |bytes_copy|. Returns true if the copy is
   // successful. Otherwise, sets |error_details| and returns false.
-  bool CopyStreamData(QuicStreamOffset offset,
-                      absl::string_view data,
-                      size_t* bytes_copy,
-                      std::string* error_details);
+  bool CopyStreamData(QuicStreamOffset offset, absl::string_view data,
+                      size_t* bytes_copy, std::string* error_details);
 
   // Dispose the given buffer block.
   // After calling this method, blocks_[index] is set to nullptr
diff --git a/quiche/quic/core/quic_stream_sequencer_test.cc b/quiche/quic/core/quic_stream_sequencer_test.cc
index 8a1b2de..0e57b09 100644
--- a/quiche/quic/core/quic_stream_sequencer_test.cc
+++ b/quiche/quic/core/quic_stream_sequencer_test.cc
@@ -33,14 +33,10 @@
  public:
   MOCK_METHOD(void, OnFinRead, (), (override));
   MOCK_METHOD(void, OnDataAvailable, (), (override));
-  MOCK_METHOD(void,
-              OnUnrecoverableError,
-              (QuicErrorCode error, const std::string& details),
-              (override));
-  MOCK_METHOD(void,
-              OnUnrecoverableError,
-              (QuicErrorCode error,
-               QuicIetfTransportErrorCodes ietf_error,
+  MOCK_METHOD(void, OnUnrecoverableError,
+              (QuicErrorCode error, const std::string& details), (override));
+  MOCK_METHOD(void, OnUnrecoverableError,
+              (QuicErrorCode error, QuicIetfTransportErrorCodes ietf_error,
                const std::string& details),
               (override));
   MOCK_METHOD(void, ResetWithError, (QuicResetStreamError error), (override));
@@ -83,8 +79,7 @@
     return VerifyReadableRegions(*sequencer_, expected);
   }
 
-  bool VerifyIovecs(iovec* iovecs,
-                    size_t num_iovecs,
+  bool VerifyIovecs(iovec* iovecs, size_t num_iovecs,
                     const std::vector<std::string>& expected) {
     return VerifyIovecs(*sequencer_, iovecs, num_iovecs, expected);
   }
@@ -110,8 +105,7 @@
            VerifyIovecs(sequencer, iovecs, num_iovecs, expected);
   }
 
-  bool VerifyIovecs(const QuicStreamSequencer& /*sequencer*/,
-                    iovec* iovecs,
+  bool VerifyIovecs(const QuicStreamSequencer& /*sequencer*/, iovec* iovecs,
                     size_t num_iovecs,
                     const std::vector<std::string>& expected) {
     int start_position = 0;
diff --git a/quiche/quic/core/quic_stream_test.cc b/quiche/quic/core/quic_stream_test.cc
index 8a112ee..dad793f 100644
--- a/quiche/quic/core/quic_stream_test.cc
+++ b/quiche/quic/core/quic_stream_test.cc
@@ -159,9 +159,8 @@
   QuicWriteBlockedList* write_blocked_list_;
   QuicTime::Delta zero_;
   ParsedQuicVersionVector supported_versions_;
-  QuicStreamId kTestStreamId =
-      GetNthClientInitiatedBidirectionalStreamId(GetParam().transport_version,
-                                                 1);
+  QuicStreamId kTestStreamId = GetNthClientInitiatedBidirectionalStreamId(
+      GetParam().transport_version, 1);
   const QuicStreamId kTestPendingStreamId =
       GetNthClientInitiatedUnidirectionalStreamId(GetParam().transport_version,
                                                   1);
diff --git a/quiche/quic/core/quic_sustained_bandwidth_recorder.cc b/quiche/quic/core/quic_sustained_bandwidth_recorder.cc
index c67e24f..810820e 100644
--- a/quiche/quic/core/quic_sustained_bandwidth_recorder.cc
+++ b/quiche/quic/core/quic_sustained_bandwidth_recorder.cc
@@ -19,12 +19,9 @@
       max_bandwidth_timestamp_(0),
       start_time_(QuicTime::Zero()) {}
 
-void QuicSustainedBandwidthRecorder::RecordEstimate(bool in_recovery,
-                                                    bool in_slow_start,
-                                                    QuicBandwidth bandwidth,
-                                                    QuicTime estimate_time,
-                                                    QuicWallTime wall_time,
-                                                    QuicTime::Delta srtt) {
+void QuicSustainedBandwidthRecorder::RecordEstimate(
+    bool in_recovery, bool in_slow_start, QuicBandwidth bandwidth,
+    QuicTime estimate_time, QuicWallTime wall_time, QuicTime::Delta srtt) {
   if (in_recovery) {
     is_recording_ = false;
     QUIC_DVLOG(1) << "Stopped recording at: "
diff --git a/quiche/quic/core/quic_sustained_bandwidth_recorder.h b/quiche/quic/core/quic_sustained_bandwidth_recorder.h
index 1a82d22..63ed6cb 100644
--- a/quiche/quic/core/quic_sustained_bandwidth_recorder.h
+++ b/quiche/quic/core/quic_sustained_bandwidth_recorder.h
@@ -34,12 +34,9 @@
   // method over a 3 * srtt period results in storage of a valid sustained
   // bandwidth estimate.
   // |time_now| is used as a max bandwidth timestamp if needed.
-  void RecordEstimate(bool in_recovery,
-                      bool in_slow_start,
-                      QuicBandwidth bandwidth,
-                      QuicTime estimate_time,
-                      QuicWallTime wall_time,
-                      QuicTime::Delta srtt);
+  void RecordEstimate(bool in_recovery, bool in_slow_start,
+                      QuicBandwidth bandwidth, QuicTime estimate_time,
+                      QuicWallTime wall_time, QuicTime::Delta srtt);
 
   bool HasEstimate() const { return has_estimate_; }
 
diff --git a/quiche/quic/core/quic_syscall_wrapper.cc b/quiche/quic/core/quic_syscall_wrapper.cc
index 2214da1..613483b 100644
--- a/quiche/quic/core/quic_syscall_wrapper.cc
+++ b/quiche/quic/core/quic_syscall_wrapper.cc
@@ -16,9 +16,7 @@
   return ::sendmsg(sockfd, msg, flags);
 }
 
-int QuicSyscallWrapper::Sendmmsg(int sockfd,
-                                 mmsghdr* msgvec,
-                                 unsigned int vlen,
+int QuicSyscallWrapper::Sendmmsg(int sockfd, mmsghdr* msgvec, unsigned int vlen,
                                  int flags) {
 #if defined(__linux__) && !defined(__ANDROID__)
   return ::sendmmsg(sockfd, msgvec, vlen, flags);
diff --git a/quiche/quic/core/quic_syscall_wrapper.h b/quiche/quic/core/quic_syscall_wrapper.h
index fb9e316..4f4ffb0 100644
--- a/quiche/quic/core/quic_syscall_wrapper.h
+++ b/quiche/quic/core/quic_syscall_wrapper.h
@@ -20,9 +20,7 @@
 
   virtual ssize_t Sendmsg(int sockfd, const msghdr* msg, int flags);
 
-  virtual int Sendmmsg(int sockfd,
-                       mmsghdr* msgvec,
-                       unsigned int vlen,
+  virtual int Sendmmsg(int sockfd, mmsghdr* msgvec, unsigned int vlen,
                        int flags);
 };
 
diff --git a/quiche/quic/core/quic_tag.cc b/quiche/quic/core/quic_tag.cc
index 48ae70a..b762e33 100644
--- a/quiche/quic/core/quic_tag.cc
+++ b/quiche/quic/core/quic_tag.cc
@@ -17,8 +17,7 @@
 namespace quic {
 
 bool FindMutualQuicTag(const QuicTagVector& our_tags,
-                       const QuicTagVector& their_tags,
-                       QuicTag* out_result,
+                       const QuicTagVector& their_tags, QuicTag* out_result,
                        size_t* out_index) {
   const size_t num_our_tags = our_tags.size();
   const size_t num_their_tags = their_tags.size();
diff --git a/quiche/quic/core/quic_time.cc b/quiche/quic/core/quic_time.cc
index 8da46fe..afbca5b 100644
--- a/quiche/quic/core/quic_time.cc
+++ b/quiche/quic/core/quic_time.cc
@@ -32,13 +32,9 @@
   return absl::StrCat(time_offset_, "us");
 }
 
-uint64_t QuicWallTime::ToUNIXSeconds() const {
-  return microseconds_ / 1000000;
-}
+uint64_t QuicWallTime::ToUNIXSeconds() const { return microseconds_ / 1000000; }
 
-uint64_t QuicWallTime::ToUNIXMicroseconds() const {
-  return microseconds_;
-}
+uint64_t QuicWallTime::ToUNIXMicroseconds() const { return microseconds_; }
 
 bool QuicWallTime::IsAfter(QuicWallTime other) const {
   return microseconds_ > other.microseconds_;
@@ -48,9 +44,7 @@
   return microseconds_ < other.microseconds_;
 }
 
-bool QuicWallTime::IsZero() const {
-  return microseconds_ == 0;
-}
+bool QuicWallTime::IsZero() const { return microseconds_ == 0; }
 
 QuicTime::Delta QuicWallTime::AbsoluteDifference(QuicWallTime other) const {
   uint64_t d;
diff --git a/quiche/quic/core/quic_time.h b/quiche/quic/core/quic_time.h
index 74cfaf2..0be5d3c 100644
--- a/quiche/quic/core/quic_time.h
+++ b/quiche/quic/core/quic_time.h
@@ -227,21 +227,13 @@
 inline bool operator==(QuicTime lhs, QuicTime rhs) {
   return lhs.time_ == rhs.time_;
 }
-inline bool operator!=(QuicTime lhs, QuicTime rhs) {
-  return !(lhs == rhs);
-}
+inline bool operator!=(QuicTime lhs, QuicTime rhs) { return !(lhs == rhs); }
 inline bool operator<(QuicTime lhs, QuicTime rhs) {
   return lhs.time_ < rhs.time_;
 }
-inline bool operator>(QuicTime lhs, QuicTime rhs) {
-  return rhs < lhs;
-}
-inline bool operator<=(QuicTime lhs, QuicTime rhs) {
-  return !(rhs < lhs);
-}
-inline bool operator>=(QuicTime lhs, QuicTime rhs) {
-  return !(lhs < rhs);
-}
+inline bool operator>(QuicTime lhs, QuicTime rhs) { return rhs < lhs; }
+inline bool operator<=(QuicTime lhs, QuicTime rhs) { return !(rhs < lhs); }
+inline bool operator>=(QuicTime lhs, QuicTime rhs) { return !(lhs < rhs); }
 
 // Override stream output operator for gtest or QUICHE_CHECK macros.
 inline std::ostream& operator<<(std::ostream& output, const QuicTime t) {
diff --git a/quiche/quic/core/quic_time_accumulator_test.cc b/quiche/quic/core/quic_time_accumulator_test.cc
index e431378..fd56df4 100644
--- a/quiche/quic/core/quic_time_accumulator_test.cc
+++ b/quiche/quic/core/quic_time_accumulator_test.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "quiche/quic/core/quic_time_accumulator.h"
+
 #include "quiche/quic/platform/api/quic_test.h"
 #include "quiche/quic/test_tools/mock_clock.h"
 
diff --git a/quiche/quic/core/quic_time_test.cc b/quiche/quic/core/quic_time_test.cc
index d2a8d91..19bf03a 100644
--- a/quiche/quic/core/quic_time_test.cc
+++ b/quiche/quic/core/quic_time_test.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "quiche/quic/core/quic_time.h"
+
 #include "quiche/quic/platform/api/quic_test.h"
 #include "quiche/quic/test_tools/mock_clock.h"
 
diff --git a/quiche/quic/core/quic_time_wait_list_manager.cc b/quiche/quic/core/quic_time_wait_list_manager.cc
index 5aeff59..a892b53 100644
--- a/quiche/quic/core/quic_time_wait_list_manager.cc
+++ b/quiche/quic/core/quic_time_wait_list_manager.cc
@@ -51,16 +51,14 @@
     bool ietf_quic,
     std::vector<std::unique_ptr<QuicEncryptedPacket>>* termination_packets,
     std::vector<QuicConnectionId> active_connection_ids)
-    : TimeWaitConnectionInfo(ietf_quic,
-                             termination_packets,
+    : TimeWaitConnectionInfo(ietf_quic, termination_packets,
                              std::move(active_connection_ids),
                              QuicTime::Delta::Zero()) {}
 
 TimeWaitConnectionInfo::TimeWaitConnectionInfo(
     bool ietf_quic,
     std::vector<std::unique_ptr<QuicEncryptedPacket>>* termination_packets,
-    std::vector<QuicConnectionId> active_connection_ids,
-    QuicTime::Delta srtt)
+    std::vector<QuicConnectionId> active_connection_ids, QuicTime::Delta srtt)
     : ietf_quic(ietf_quic),
       active_connection_ids(std::move(active_connection_ids)),
       srtt(srtt) {
@@ -70,9 +68,7 @@
 }
 
 QuicTimeWaitListManager::QuicTimeWaitListManager(
-    QuicPacketWriter* writer,
-    Visitor* visitor,
-    const QuicClock* clock,
+    QuicPacketWriter* writer, Visitor* visitor, const QuicClock* clock,
     QuicAlarmFactory* alarm_factory)
     : time_wait_period_(QuicTime::Delta::FromSeconds(
           GetQuicFlag(FLAGS_quic_time_wait_list_seconds))),
@@ -99,10 +95,8 @@
 }
 
 void QuicTimeWaitListManager::AddConnectionIdDataToMap(
-    const QuicConnectionId& canonical_connection_id,
-    int num_packets,
-    TimeWaitAction action,
-    TimeWaitConnectionInfo info) {
+    const QuicConnectionId& canonical_connection_id, int num_packets,
+    TimeWaitAction action, TimeWaitConnectionInfo info) {
   for (const auto& cid : info.active_connection_ids) {
     indirect_connection_id_map_[cid] = canonical_connection_id;
   }
@@ -121,8 +115,7 @@
 }
 
 void QuicTimeWaitListManager::AddConnectionIdToTimeWait(
-    TimeWaitAction action,
-    TimeWaitConnectionInfo info) {
+    TimeWaitAction action, TimeWaitConnectionInfo info) {
   QUICHE_DCHECK(!info.active_connection_ids.empty());
   const QuicConnectionId& canonical_connection_id =
       info.active_connection_ids.front();
@@ -168,10 +161,8 @@
 
 void QuicTimeWaitListManager::ProcessPacket(
     const QuicSocketAddress& self_address,
-    const QuicSocketAddress& peer_address,
-    QuicConnectionId connection_id,
-    PacketHeaderFormat header_format,
-    size_t received_packet_length,
+    const QuicSocketAddress& peer_address, QuicConnectionId connection_id,
+    PacketHeaderFormat header_format, size_t received_packet_length,
     std::unique_ptr<QuicPerPacketContext> packet_context) {
   QUICHE_DCHECK(IsConnectionIdInTimeWait(connection_id));
   // TODO(satyamshekhar): Think about handling packets from different peer
@@ -264,10 +255,8 @@
 
 void QuicTimeWaitListManager::SendVersionNegotiationPacket(
     QuicConnectionId server_connection_id,
-    QuicConnectionId client_connection_id,
-    bool ietf_quic,
-    bool use_length_prefix,
-    const ParsedQuicVersionVector& supported_versions,
+    QuicConnectionId client_connection_id, bool ietf_quic,
+    bool use_length_prefix, const ParsedQuicVersionVector& supported_versions,
     const QuicSocketAddress& self_address,
     const QuicSocketAddress& peer_address,
     std::unique_ptr<QuicPerPacketContext> packet_context) {
@@ -295,10 +284,8 @@
 
 void QuicTimeWaitListManager::SendPublicReset(
     const QuicSocketAddress& self_address,
-    const QuicSocketAddress& peer_address,
-    QuicConnectionId connection_id,
-    bool ietf_quic,
-    size_t received_packet_length,
+    const QuicSocketAddress& peer_address, QuicConnectionId connection_id,
+    bool ietf_quic, size_t received_packet_length,
     std::unique_ptr<QuicPerPacketContext> packet_context) {
   if (ietf_quic) {
     std::unique_ptr<QuicEncryptedPacket> ietf_reset_packet =
@@ -354,8 +341,7 @@
 
 std::unique_ptr<QuicEncryptedPacket>
 QuicTimeWaitListManager::BuildIetfStatelessResetPacket(
-    QuicConnectionId connection_id,
-    size_t received_packet_length) {
+    QuicConnectionId connection_id, size_t received_packet_length) {
   return QuicFramer::BuildIetfStatelessResetPacket(
       connection_id, received_packet_length,
       GetStatelessResetToken(connection_id));
@@ -481,9 +467,7 @@
 }
 
 QuicTimeWaitListManager::ConnectionIdData::ConnectionIdData(
-    int num_packets,
-    QuicTime time_added,
-    TimeWaitAction action,
+    int num_packets, QuicTime time_added, TimeWaitAction action,
     TimeWaitConnectionInfo info)
     : num_packets(num_packets),
       time_added(time_added),
diff --git a/quiche/quic/core/quic_time_wait_list_manager.h b/quiche/quic/core/quic_time_wait_list_manager.h
index a40fa2f..676e15e 100644
--- a/quiche/quic/core/quic_time_wait_list_manager.h
+++ b/quiche/quic/core/quic_time_wait_list_manager.h
@@ -91,8 +91,7 @@
   // visitor - the entity that manages blocked writers. (Owned by the caller)
   // clock - provide a clock (Owned by the caller)
   // alarm_factory - used to run clean up alarms. (Owned by the caller)
-  QuicTimeWaitListManager(QuicPacketWriter* writer,
-                          Visitor* visitor,
+  QuicTimeWaitListManager(QuicPacketWriter* writer, Visitor* visitor,
                           const QuicClock* clock,
                           QuicAlarmFactory* alarm_factory);
   QuicTimeWaitListManager(const QuicTimeWaitListManager&) = delete;
@@ -122,10 +121,8 @@
   // ReceivedPacketInfo.
   virtual void ProcessPacket(
       const QuicSocketAddress& self_address,
-      const QuicSocketAddress& peer_address,
-      QuicConnectionId connection_id,
-      PacketHeaderFormat header_format,
-      size_t received_packet_length,
+      const QuicSocketAddress& peer_address, QuicConnectionId connection_id,
+      PacketHeaderFormat header_format, size_t received_packet_length,
       std::unique_ptr<QuicPerPacketContext> packet_context);
 
   // Called by the dispatcher when the underlying socket becomes writable again,
@@ -153,10 +150,8 @@
   // |peer_address| from |self_address|.
   virtual void SendVersionNegotiationPacket(
       QuicConnectionId server_connection_id,
-      QuicConnectionId client_connection_id,
-      bool ietf_quic,
-      bool use_length_prefix,
-      const ParsedQuicVersionVector& supported_versions,
+      QuicConnectionId client_connection_id, bool ietf_quic,
+      bool use_length_prefix, const ParsedQuicVersionVector& supported_versions,
       const QuicSocketAddress& self_address,
       const QuicSocketAddress& peer_address,
       std::unique_ptr<QuicPerPacketContext> packet_context);
@@ -164,10 +159,8 @@
   // Creates a public reset packet and sends it or queues it to be sent later.
   virtual void SendPublicReset(
       const QuicSocketAddress& self_address,
-      const QuicSocketAddress& peer_address,
-      QuicConnectionId connection_id,
-      bool ietf_quic,
-      size_t received_packet_length,
+      const QuicSocketAddress& peer_address, QuicConnectionId connection_id,
+      bool ietf_quic, size_t received_packet_length,
       std::unique_ptr<QuicPerPacketContext> packet_context);
 
   // Called to send |packet|.
@@ -256,22 +249,18 @@
 
   // Called when a packet is received for a connection in this time wait list.
   virtual void OnPacketReceivedForKnownConnection(
-      int /*num_packets*/,
-      QuicTime::Delta /*delta*/,
+      int /*num_packets*/, QuicTime::Delta /*delta*/,
       QuicTime::Delta /*srtt*/) const {}
 
   std::unique_ptr<QuicEncryptedPacket> BuildIetfStatelessResetPacket(
-      QuicConnectionId connection_id,
-      size_t received_packet_length);
+      QuicConnectionId connection_id, size_t received_packet_length);
 
   // A map from a recently closed connection_id to the number of packets
   // received after the termination of the connection bound to the
   // connection_id.
   struct QUIC_NO_EXPORT ConnectionIdData {
-    ConnectionIdData(int num_packets,
-                     QuicTime time_added,
-                     TimeWaitAction action,
-                     TimeWaitConnectionInfo info);
+    ConnectionIdData(int num_packets, QuicTime time_added,
+                     TimeWaitAction action, TimeWaitConnectionInfo info);
 
     ConnectionIdData(const ConnectionIdData& other) = delete;
     ConnectionIdData(ConnectionIdData&& other);
@@ -286,9 +275,9 @@
 
   // QuicheLinkedHashMap allows lookup by ConnectionId
   // and traversal in add order.
-  using ConnectionIdMap = quiche::QuicheLinkedHashMap<QuicConnectionId,
-                                                      ConnectionIdData,
-                                                      QuicConnectionIdHash>;
+  using ConnectionIdMap =
+      quiche::QuicheLinkedHashMap<QuicConnectionId, ConnectionIdData,
+                                  QuicConnectionIdHash>;
   // Do not use find/emplace/erase on this map directly. Use
   // FindConnectionIdDataInMap, AddConnectionIdDateToMap,
   // RemoveConnectionDataFromMap instead.
@@ -310,8 +299,7 @@
       const QuicConnectionId& connection_id);
   // Inserts a ConnectionIdData entry to connection_id_map_.
   void AddConnectionIdDataToMap(const QuicConnectionId& canonical_connection_id,
-                                int num_packets,
-                                TimeWaitAction action,
+                                int num_packets, TimeWaitAction action,
                                 TimeWaitConnectionInfo info);
   // Removes a ConnectionIdData entry in connection_id_map_.
   void RemoveConnectionDataFromMap(ConnectionIdMap::iterator it);
diff --git a/quiche/quic/core/quic_time_wait_list_manager_test.cc b/quiche/quic/core/quic_time_wait_list_manager_test.cc
index ee59fac..93f6d87 100644
--- a/quiche/quic/core/quic_time_wait_list_manager_test.cc
+++ b/quiche/quic/core/quic_time_wait_list_manager_test.cc
@@ -80,8 +80,7 @@
 class MockAlarmFactory;
 class MockAlarm : public QuicAlarm {
  public:
-  explicit MockAlarm(QuicArenaScopedPtr<Delegate> delegate,
-                     int alarm_index,
+  explicit MockAlarm(QuicArenaScopedPtr<Delegate> delegate, int alarm_index,
                      MockAlarmFactory* factory)
       : QuicAlarm(std::move(delegate)),
         alarm_index_(alarm_index),
@@ -124,13 +123,9 @@
   int alarm_index_ = 0;
 };
 
-void MockAlarm::SetImpl() {
-  factory_->OnAlarmSet(alarm_index_, deadline());
-}
+void MockAlarm::SetImpl() { factory_->OnAlarmSet(alarm_index_, deadline()); }
 
-void MockAlarm::CancelImpl() {
-  factory_->OnAlarmCancelled(alarm_index_);
-}
+void MockAlarm::CancelImpl() { factory_->OnAlarmCancelled(alarm_index_); }
 
 class QuicTimeWaitListManagerTest : public QuicTest {
  protected:
@@ -162,8 +157,7 @@
   }
 
   void AddConnectionId(
-      QuicConnectionId connection_id,
-      ParsedQuicVersion version,
+      QuicConnectionId connection_id, ParsedQuicVersion version,
       QuicTimeWaitListManager::TimeWaitAction action,
       std::vector<std::unique_ptr<QuicEncryptedPacket>>* packets) {
     time_wait_list_manager_.AddConnectionIdToTimeWait(
@@ -183,8 +177,7 @@
 
   QuicEncryptedPacket* ConstructEncryptedPacket(
       QuicConnectionId destination_connection_id,
-      QuicConnectionId source_connection_id,
-      uint64_t packet_number) {
+      QuicConnectionId source_connection_id, uint64_t packet_number) {
     return quic::test::ConstructEncryptedPacket(destination_connection_id,
                                                 source_connection_id, false,
                                                 false, packet_number, "data");
diff --git a/quiche/quic/core/quic_trace_visitor.cc b/quiche/quic/core/quic_trace_visitor.cc
index d7dd18b..04bbda6 100644
--- a/quiche/quic/core/quic_trace_visitor.cc
+++ b/quiche/quic/core/quic_trace_visitor.cc
@@ -45,14 +45,10 @@
 }
 
 void QuicTraceVisitor::OnPacketSent(
-    QuicPacketNumber packet_number,
-    QuicPacketLength packet_length,
-    bool /*has_crypto_handshake*/,
-    TransmissionType /*transmission_type*/,
-    EncryptionLevel encryption_level,
-    const QuicFrames& retransmittable_frames,
-    const QuicFrames& /*nonretransmittable_frames*/,
-    QuicTime sent_time) {
+    QuicPacketNumber packet_number, QuicPacketLength packet_length,
+    bool /*has_crypto_handshake*/, TransmissionType /*transmission_type*/,
+    EncryptionLevel encryption_level, const QuicFrames& retransmittable_frames,
+    const QuicFrames& /*nonretransmittable_frames*/, QuicTime sent_time) {
   quic_trace::Event* event = trace_.add_events();
   event->set_event_type(quic_trace::PACKET_SENT);
   event->set_time_us(ConvertTimestampToRecordedFormat(sent_time));
@@ -234,12 +230,9 @@
 }
 
 void QuicTraceVisitor::OnIncomingAck(
-    QuicPacketNumber /*ack_packet_number*/,
-    EncryptionLevel ack_decrypted_level,
-    const QuicAckFrame& ack_frame,
-    QuicTime ack_receive_time,
-    QuicPacketNumber /*largest_observed*/,
-    bool /*rtt_updated*/,
+    QuicPacketNumber /*ack_packet_number*/, EncryptionLevel ack_decrypted_level,
+    const QuicAckFrame& ack_frame, QuicTime ack_receive_time,
+    QuicPacketNumber /*largest_observed*/, bool /*rtt_updated*/,
     QuicPacketNumber /*least_unacked_sent_packet*/) {
   quic_trace::Event* event = trace_.add_events();
   event->set_time_us(ConvertTimestampToRecordedFormat(ack_receive_time));
diff --git a/quiche/quic/core/quic_trace_visitor.h b/quiche/quic/core/quic_trace_visitor.h
index a0808ab..43b8813 100644
--- a/quiche/quic/core/quic_trace_visitor.h
+++ b/quiche/quic/core/quic_trace_visitor.h
@@ -19,8 +19,7 @@
   explicit QuicTraceVisitor(const QuicConnection* connection);
 
   void OnPacketSent(QuicPacketNumber packet_number,
-                    QuicPacketLength packet_length,
-                    bool has_crypto_handshake,
+                    QuicPacketLength packet_length, bool has_crypto_handshake,
                     TransmissionType transmission_type,
                     EncryptionLevel encryption_level,
                     const QuicFrames& retransmittable_frames,
@@ -29,10 +28,8 @@
 
   void OnIncomingAck(QuicPacketNumber ack_packet_number,
                      EncryptionLevel ack_decrypted_level,
-                     const QuicAckFrame& ack_frame,
-                     QuicTime ack_receive_time,
-                     QuicPacketNumber largest_observed,
-                     bool rtt_updated,
+                     const QuicAckFrame& ack_frame, QuicTime ack_receive_time,
+                     QuicPacketNumber largest_observed, bool rtt_updated,
                      QuicPacketNumber least_unacked_sent_packet) override;
 
   void OnPacketLoss(QuicPacketNumber lost_packet_number,
@@ -48,8 +45,7 @@
 
   void OnApplicationLimited() override;
 
-  void OnAdjustNetworkParameters(QuicBandwidth bandwidth,
-                                 QuicTime::Delta rtt,
+  void OnAdjustNetworkParameters(QuicBandwidth bandwidth, QuicTime::Delta rtt,
                                  QuicByteCount old_cwnd,
                                  QuicByteCount new_cwnd) override;
 
diff --git a/quiche/quic/core/quic_transmission_info.cc b/quiche/quic/core/quic_transmission_info.cc
index 1f61dd5..699b2a0 100644
--- a/quiche/quic/core/quic_transmission_info.cc
+++ b/quiche/quic/core/quic_transmission_info.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "quiche/quic/core/quic_transmission_info.h"
+
 #include "absl/strings/str_cat.h"
 
 namespace quic {
diff --git a/quiche/quic/core/quic_transmission_info.h b/quiche/quic/core/quic_transmission_info.h
index 5a10c07..81d48cc 100644
--- a/quiche/quic/core/quic_transmission_info.h
+++ b/quiche/quic/core/quic_transmission_info.h
@@ -22,10 +22,8 @@
   // Constructs a Transmission with a new all_transmissions set
   // containing |packet_number|.
   QuicTransmissionInfo(EncryptionLevel level,
-                       TransmissionType transmission_type,
-                       QuicTime sent_time,
-                       QuicPacketLength bytes_sent,
-                       bool has_crypto_handshake,
+                       TransmissionType transmission_type, QuicTime sent_time,
+                       QuicPacketLength bytes_sent, bool has_crypto_handshake,
                        bool has_ack_frequency);
 
   QuicTransmissionInfo(const QuicTransmissionInfo& other);
diff --git a/quiche/quic/core/quic_udp_socket.h b/quiche/quic/core/quic_udp_socket.h
index fcfdcac..039b07a 100644
--- a/quiche/quic/core/quic_udp_socket.h
+++ b/quiche/quic/core/quic_udp_socket.h
@@ -7,7 +7,6 @@
 
 #include <cstddef>
 #include <cstdint>
-
 #include <type_traits>
 
 #include "quiche/quic/core/quic_types.h"
@@ -167,10 +166,8 @@
   // addresses is disabled. This is only necessary for IPv6 sockets on iOS - all
   // other platforms can ignore this parameter. Return kQuicInvalidSocketFd if
   // failed.
-  QuicUdpSocketFd Create(int address_family,
-                         int receive_buffer_size,
-                         int send_buffer_size,
-                         bool ipv6_only = false);
+  QuicUdpSocketFd Create(int address_family, int receive_buffer_size,
+                         int send_buffer_size, bool ipv6_only = false);
 
   // Closes |fd|. No-op if |fd| equals to kQuicInvalidSocketFd.
   void Destroy(QuicUdpSocketFd fd);
@@ -217,8 +214,7 @@
   //
   // If |*result| is reused for subsequent ReadPacket() calls, caller needs to
   // call result->Reset() before each ReadPacket().
-  void ReadPacket(QuicUdpSocketFd fd,
-                  BitMask64 packet_info_interested,
+  void ReadPacket(QuicUdpSocketFd fd, BitMask64 packet_info_interested,
                   ReadPacketResult* result);
 
   using ReadPacketResults = std::vector<ReadPacketResult>;
@@ -233,16 +229,13 @@
   // Write a packet to |fd|.
   // packet_buffer, packet_buffer_len:  The packet buffer to write.
   // packet_info:                       The per packet information to set.
-  WriteResult WritePacket(QuicUdpSocketFd fd,
-                          const char* packet_buffer,
+  WriteResult WritePacket(QuicUdpSocketFd fd, const char* packet_buffer,
                           size_t packet_buffer_len,
                           const QuicUdpPacketInfo& packet_info);
 
  protected:
-  bool SetupSocket(QuicUdpSocketFd fd,
-                   int address_family,
-                   int receive_buffer_size,
-                   int send_buffer_size,
+  bool SetupSocket(QuicUdpSocketFd fd, int address_family,
+                   int receive_buffer_size, int send_buffer_size,
                    bool ipv6_only);
   bool EnableReceiveSelfIpAddressForV4(QuicUdpSocketFd fd);
   bool EnableReceiveSelfIpAddressForV6(QuicUdpSocketFd fd);
diff --git a/quiche/quic/core/quic_udp_socket_posix.cc b/quiche/quic/core/quic_udp_socket_posix.cc
index 5851bea..c1ce940 100644
--- a/quiche/quic/core/quic_udp_socket_posix.cc
+++ b/quiche/quic/core/quic_udp_socket_posix.cc
@@ -2,10 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "quiche/quic/core/quic_udp_socket.h"
-#include "quiche/quic/platform/api/quic_bug_tracker.h"
-#include "quiche/quic/platform/api/quic_udp_socket_platform_api.h"
-
 #include <arpa/inet.h>
 #include <fcntl.h>
 #include <netinet/in.h>
@@ -13,6 +9,10 @@
 #include <sys/socket.h>
 #include <sys/types.h>
 
+#include "quiche/quic/core/quic_udp_socket.h"
+#include "quiche/quic/platform/api/quic_bug_tracker.h"
+#include "quiche/quic/platform/api/quic_udp_socket_platform_api.h"
+
 #if defined(__APPLE__) && !defined(__APPLE_USE_RFC_3542)
 #error "__APPLE_USE_RFC_3542 needs to be defined."
 #endif
@@ -197,12 +197,8 @@
   }
 }
 
-bool NextCmsg(msghdr* hdr,
-              char* control_buffer,
-              size_t control_buffer_len,
-              int cmsg_level,
-              int cmsg_type,
-              size_t data_size,
+bool NextCmsg(msghdr* hdr, char* control_buffer, size_t control_buffer_len,
+              int cmsg_level, int cmsg_type, size_t data_size,
               cmsghdr** cmsg /*in, out*/) {
   // msg_controllen needs to be increased first, otherwise CMSG_NXTHDR will
   // return nullptr.
@@ -235,8 +231,7 @@
 
 QuicUdpSocketFd QuicUdpSocketApi::Create(int address_family,
                                          int receive_buffer_size,
-                                         int send_buffer_size,
-                                         bool ipv6_only) {
+                                         int send_buffer_size, bool ipv6_only) {
   // QUICHE_DCHECK here so the program exits early(before reading packets) in
   // debug mode. This should have been a static_assert, however it can't be done
   // on ios/osx because CMSG_SPACE isn't a constant expression there.
@@ -256,11 +251,9 @@
   return fd;
 }
 
-bool QuicUdpSocketApi::SetupSocket(QuicUdpSocketFd fd,
-                                   int address_family,
+bool QuicUdpSocketApi::SetupSocket(QuicUdpSocketFd fd, int address_family,
                                    int receive_buffer_size,
-                                   int send_buffer_size,
-                                   bool ipv6_only) {
+                                   int send_buffer_size, bool ipv6_only) {
   // Receive buffer size.
   if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &receive_buffer_size,
                  sizeof(receive_buffer_size)) != 0) {
@@ -560,9 +553,7 @@
 }
 
 WriteResult QuicUdpSocketApi::WritePacket(
-    QuicUdpSocketFd fd,
-    const char* packet_buffer,
-    size_t packet_buffer_len,
+    QuicUdpSocketFd fd, const char* packet_buffer, size_t packet_buffer_len,
     const QuicUdpPacketInfo& packet_info) {
   if (!packet_info.HasValue(QuicUdpPacketInfoBit::PEER_ADDRESS)) {
     return WriteResult(WRITE_STATUS_ERROR, EINVAL);
diff --git a/quiche/quic/core/quic_unacked_packet_map.cc b/quiche/quic/core/quic_unacked_packet_map.cc
index 63c345e..9b7a0fb 100644
--- a/quiche/quic/core/quic_unacked_packet_map.cc
+++ b/quiche/quic/core/quic_unacked_packet_map.cc
@@ -119,13 +119,11 @@
       bytes_in_flight_per_packet_number_space_{0, 0, 0},
       packets_in_flight_(0),
       last_inflight_packet_sent_time_(QuicTime::Zero()),
-      last_inflight_packets_sent_time_{{QuicTime::Zero()},
-                                       {QuicTime::Zero()},
-                                       {QuicTime::Zero()}},
+      last_inflight_packets_sent_time_{
+          {QuicTime::Zero()}, {QuicTime::Zero()}, {QuicTime::Zero()}},
       last_crypto_packet_sent_time_(QuicTime::Zero()),
       session_notifier_(nullptr),
-      supports_multiple_packet_number_spaces_(false) {
-}
+      supports_multiple_packet_number_spaces_(false) {}
 
 QuicUnackedPacketMap::~QuicUnackedPacketMap() {
   for (QuicTransmissionInfo& transmission_info : unacked_packets_) {
@@ -135,8 +133,7 @@
 
 void QuicUnackedPacketMap::AddSentPacket(SerializedPacket* mutable_packet,
                                          TransmissionType transmission_type,
-                                         QuicTime sent_time,
-                                         bool set_in_flight,
+                                         QuicTime sent_time, bool set_in_flight,
                                          bool measure_rtt) {
   const SerializedPacket& packet = *mutable_packet;
   QuicPacketNumber packet_number = packet.packet_number;
@@ -248,14 +245,12 @@
 }
 
 void QuicUnackedPacketMap::MaybeUpdateLargestAckedOfPacketNumberSpace(
-    PacketNumberSpace packet_number_space,
-    QuicPacketNumber packet_number) {
+    PacketNumberSpace packet_number_space, QuicPacketNumber packet_number) {
   largest_acked_packets_[packet_number_space].UpdateMax(packet_number);
 }
 
 bool QuicUnackedPacketMap::IsPacketUsefulForMeasuringRtt(
-    QuicPacketNumber packet_number,
-    const QuicTransmissionInfo& info) const {
+    QuicPacketNumber packet_number, const QuicTransmissionInfo& info) const {
   // Packet can be used for RTT measurement if it may yet be acked as the
   // largest observed packet by the receiver.
   return QuicUtils::IsAckable(info.state) &&
@@ -278,8 +273,7 @@
 }
 
 bool QuicUnackedPacketMap::IsPacketUseless(
-    QuicPacketNumber packet_number,
-    const QuicTransmissionInfo& info) const {
+    QuicPacketNumber packet_number, const QuicTransmissionInfo& info) const {
   return !IsPacketUsefulForMeasuringRtt(packet_number, info) &&
          !IsPacketUsefulForCongestionControl(info) &&
          !IsPacketUsefulForRetransmittableData(info);
@@ -483,8 +477,7 @@
 }
 
 void QuicUnackedPacketMap::MaybeAggregateAckedStreamFrame(
-    const QuicTransmissionInfo& info,
-    QuicTime::Delta ack_delay,
+    const QuicTransmissionInfo& info, QuicTime::Delta ack_delay,
     QuicTime receive_timestamp) {
   if (session_notifier_ == nullptr) {
     return;
diff --git a/quiche/quic/core/quic_unacked_packet_map.h b/quiche/quic/core/quic_unacked_packet_map.h
index ebbabe8..2c7141d 100644
--- a/quiche/quic/core/quic_unacked_packet_map.h
+++ b/quiche/quic/core/quic_unacked_packet_map.h
@@ -41,10 +41,8 @@
   // Any retransmittible_frames in |mutable_packet| are swapped from
   // |mutable_packet| into the QuicTransmissionInfo.
   void AddSentPacket(SerializedPacket* mutable_packet,
-                     TransmissionType transmission_type,
-                     QuicTime sent_time,
-                     bool set_in_flight,
-                     bool measure_rtt);
+                     TransmissionType transmission_type, QuicTime sent_time,
+                     bool set_in_flight, bool measure_rtt);
 
   // Returns true if the packet |packet_number| is unacked.
   bool IsUnacked(QuicPacketNumber packet_number) const;
@@ -52,8 +50,7 @@
   // Notifies session_notifier that frames have been acked. Returns true if any
   // new data gets acked, returns false otherwise.
   bool NotifyFramesAcked(const QuicTransmissionInfo& info,
-                         QuicTime::Delta ack_delay,
-                         QuicTime receive_timestamp);
+                         QuicTime::Delta ack_delay, QuicTime receive_timestamp);
 
   // Notifies session_notifier that frames in |info| are considered as lost.
   void NotifyFramesLost(const QuicTransmissionInfo& info,
@@ -176,8 +173,7 @@
   // Called when |packet_number| gets acked. Maybe increase the largest acked of
   // |packet_number_space|.
   void MaybeUpdateLargestAckedOfPacketNumberSpace(
-      PacketNumberSpace packet_number_space,
-      QuicPacketNumber packet_number);
+      PacketNumberSpace packet_number_space, QuicPacketNumber packet_number);
 
   // Remove any packets no longer needed for retransmission, congestion, or
   // RTT measurement purposes.
diff --git a/quiche/quic/core/quic_unacked_packet_map_test.cc b/quiche/quic/core/quic_unacked_packet_map_test.cc
index 02102fd..3acb13a 100644
--- a/quiche/quic/core/quic_unacked_packet_map_test.cc
+++ b/quiche/quic/core/quic_unacked_packet_map_test.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "quiche/quic/core/quic_unacked_packet_map.h"
+
 #include <cstddef>
 #include <limits>
 
@@ -47,8 +48,7 @@
   }
 
   SerializedPacket CreateRetransmittablePacketForStream(
-      uint64_t packet_number,
-      QuicStreamId stream_id) {
+      uint64_t packet_number, QuicStreamId stream_id) {
     SerializedPacket packet(QuicPacketNumber(packet_number),
                             PACKET_1BYTE_PACKET_NUMBER, nullptr, kDefaultLength,
                             false, false);
@@ -163,8 +163,7 @@
   StrictMock<MockSessionNotifier> notifier_;
 };
 
-INSTANTIATE_TEST_SUITE_P(Tests,
-                         QuicUnackedPacketMapTest,
+INSTANTIATE_TEST_SUITE_P(Tests, QuicUnackedPacketMapTest,
                          ::testing::ValuesIn({Perspective::IS_CLIENT,
                                               Perspective::IS_SERVER}),
                          ::testing::PrintToStringParamName());
diff --git a/quiche/quic/core/quic_utils.cc b/quiche/quic/core/quic_utils.cc
index 105c20c..fcda2e6 100644
--- a/quiche/quic/core/quic_utils.cc
+++ b/quiche/quic/core/quic_utils.cc
@@ -367,8 +367,7 @@
 }
 
 // static
-bool QuicUtils::IsOutgoingStreamId(ParsedQuicVersion version,
-                                   QuicStreamId id,
+bool QuicUtils::IsOutgoingStreamId(ParsedQuicVersion version, QuicStreamId id,
                                    Perspective perspective) {
   // Streams are outgoing streams, iff:
   // - we are the server and the stream is server-initiated
@@ -387,8 +386,7 @@
 }
 
 // static
-StreamType QuicUtils::GetStreamType(QuicStreamId id,
-                                    Perspective perspective,
+StreamType QuicUtils::GetStreamType(QuicStreamId id, Perspective perspective,
                                     bool peer_initiated,
                                     ParsedQuicVersion version) {
   QUICHE_DCHECK(version.HasIetfQuicFrames());
@@ -422,8 +420,7 @@
 
 // static
 QuicStreamId QuicUtils::GetFirstBidirectionalStreamId(
-    QuicTransportVersion version,
-    Perspective perspective) {
+    QuicTransportVersion version, Perspective perspective) {
   if (VersionHasIetfQuicFrames(version)) {
     return perspective == Perspective::IS_CLIENT ? 0 : 1;
   } else if (QuicVersionUsesCryptoFrames(version)) {
@@ -434,8 +431,7 @@
 
 // static
 QuicStreamId QuicUtils::GetFirstUnidirectionalStreamId(
-    QuicTransportVersion version,
-    Perspective perspective) {
+    QuicTransportVersion version, Perspective perspective) {
   if (VersionHasIetfQuicFrames(version)) {
     return perspective == Perspective::IS_CLIENT ? 2 : 3;
   } else if (QuicVersionUsesCryptoFrames(version)) {
@@ -510,8 +506,7 @@
 
 // static
 QuicConnectionId QuicUtils::CreateRandomConnectionId(
-    uint8_t connection_id_length,
-    QuicRandom* random) {
+    uint8_t connection_id_length, QuicRandom* random) {
   QuicConnectionId connection_id;
   connection_id.set_length(connection_id_length);
   if (connection_id.length() > 0) {
@@ -533,8 +528,7 @@
 
 // static
 bool QuicUtils::IsConnectionIdLengthValidForVersion(
-    size_t connection_id_length,
-    QuicTransportVersion transport_version) {
+    size_t connection_id_length, QuicTransportVersion transport_version) {
   // No version of QUIC can support lengths that do not fit in an uint8_t.
   if (connection_id_length >
       static_cast<size_t>(std::numeric_limits<uint8_t>::max())) {
@@ -566,8 +560,7 @@
 
 // static
 bool QuicUtils::IsConnectionIdValidForVersion(
-    QuicConnectionId connection_id,
-    QuicTransportVersion transport_version) {
+    QuicConnectionId connection_id, QuicTransportVersion transport_version) {
   return IsConnectionIdLengthValidForVersion(connection_id.length(),
                                              transport_version);
 }
@@ -651,8 +644,7 @@
 
 // static
 bool QuicUtils::AreStatelessResetTokensEqual(
-    const StatelessResetToken& token1,
-    const StatelessResetToken& token2) {
+    const StatelessResetToken& token1, const StatelessResetToken& token2) {
   char byte = 0;
   for (size_t i = 0; i < kStatelessResetTokenLength; i++) {
     // This avoids compiler optimizations that could make us stop comparing
diff --git a/quiche/quic/core/quic_utils.h b/quiche/quic/core/quic_utils.h
index 6c2197b..202dc4b 100644
--- a/quiche/quic/core/quic_utils.h
+++ b/quiche/quic/core/quic_utils.h
@@ -129,8 +129,7 @@
 
   // Returns true if the stream ID represents a stream initiated by the
   // provided perspective.
-  static bool IsOutgoingStreamId(ParsedQuicVersion version,
-                                 QuicStreamId id,
+  static bool IsOutgoingStreamId(ParsedQuicVersion version, QuicStreamId id,
                                  Perspective perspective);
 
   // Returns true if |id| is considered as bidirectional stream ID. Only used in
@@ -141,8 +140,7 @@
   // Returns stream type.  Either |perspective| or |peer_initiated| would be
   // enough together with |id|.  This method enforces that the three parameters
   // are consistent.  Only used in v99.
-  static StreamType GetStreamType(QuicStreamId id,
-                                  Perspective perspective,
+  static StreamType GetStreamType(QuicStreamId id, Perspective perspective,
                                   bool peer_initiated,
                                   ParsedQuicVersion version);
 
@@ -151,13 +149,11 @@
 
   // Returns the first initiated bidirectional stream ID of |perspective|.
   static QuicStreamId GetFirstBidirectionalStreamId(
-      QuicTransportVersion version,
-      Perspective perspective);
+      QuicTransportVersion version, Perspective perspective);
 
   // Returns the first initiated unidirectional stream ID of |perspective|.
   static QuicStreamId GetFirstUnidirectionalStreamId(
-      QuicTransportVersion version,
-      Perspective perspective);
+      QuicTransportVersion version, Perspective perspective);
 
   // Returns the largest possible client initiated bidirectional stream ID.
   static QuicStreamId GetMaxClientInitiatedBidirectionalStreamId(
@@ -194,13 +190,11 @@
 
   // Returns true if the connection ID length is valid for this QUIC version.
   static bool IsConnectionIdLengthValidForVersion(
-      size_t connection_id_length,
-      QuicTransportVersion transport_version);
+      size_t connection_id_length, QuicTransportVersion transport_version);
 
   // Returns true if the connection ID is valid for this QUIC version.
   static bool IsConnectionIdValidForVersion(
-      QuicConnectionId connection_id,
-      QuicTransportVersion transport_version);
+      QuicConnectionId connection_id, QuicTransportVersion transport_version);
 
   // Returns a connection ID suitable for QUIC use-cases that do not need the
   // connection ID for multiplexing. If the version allows variable lengths,
diff --git a/quiche/quic/core/quic_version_manager_test.cc b/quiche/quic/core/quic_version_manager_test.cc
index 8ef018a..76add7b 100644
--- a/quiche/quic/core/quic_version_manager_test.cc
+++ b/quiche/quic/core/quic_version_manager_test.cc
@@ -74,9 +74,8 @@
   EXPECT_EQ(3u, manager.GetSupportedVersionsWithOnlyHttp3().size());
   EXPECT_EQ(CurrentSupportedHttp3Versions(),
             manager.GetSupportedVersionsWithOnlyHttp3());
-  EXPECT_THAT(
-      manager.GetSupportedAlpns(),
-      ElementsAre("h3", "h3-29", "h3-Q050", "h3-Q046", "h3-Q043"));
+  EXPECT_THAT(manager.GetSupportedAlpns(),
+              ElementsAre("h3", "h3-29", "h3-Q050", "h3-Q046", "h3-Q043"));
 }
 
 }  // namespace
diff --git a/quiche/quic/core/quic_write_blocked_list.cc b/quiche/quic/core/quic_write_blocked_list.cc
index 231259b..ad619b1 100644
--- a/quiche/quic/core/quic_write_blocked_list.cc
+++ b/quiche/quic/core/quic_write_blocked_list.cc
@@ -63,8 +63,7 @@
 }
 
 void QuicWriteBlockedList::RegisterStream(
-    QuicStreamId stream_id,
-    bool is_static_stream,
+    QuicStreamId stream_id, bool is_static_stream,
     const spdy::SpdyStreamPrecedence& precedence) {
   QUICHE_DCHECK(!priority_write_scheduler_.StreamRegistered(stream_id))
       << "stream " << stream_id << " already registered";
@@ -87,8 +86,7 @@
 }
 
 void QuicWriteBlockedList::UpdateStreamPriority(
-    QuicStreamId stream_id,
-    const spdy::SpdyStreamPrecedence& new_precedence) {
+    QuicStreamId stream_id, const spdy::SpdyStreamPrecedence& new_precedence) {
   QUICHE_DCHECK(!static_stream_collection_.IsRegistered(stream_id));
   QUICHE_DCHECK(new_precedence.is_spdy3_priority());
   priority_write_scheduler_.UpdateStreamPrecedence(stream_id, new_precedence);
diff --git a/quiche/quic/core/quic_write_blocked_list.h b/quiche/quic/core/quic_write_blocked_list.h
index f8bf603..8aa355e 100644
--- a/quiche/quic/core/quic_write_blocked_list.h
+++ b/quiche/quic/core/quic_write_blocked_list.h
@@ -57,8 +57,7 @@
   // purposes.
   QuicStreamId PopFront();
 
-  void RegisterStream(QuicStreamId stream_id,
-                      bool is_static_stream,
+  void RegisterStream(QuicStreamId stream_id, bool is_static_stream,
                       const spdy::SpdyStreamPrecedence& precedence);
 
   void UnregisterStream(QuicStreamId stream_id, bool is_static);
diff --git a/quiche/quic/core/quic_write_blocked_list_test.cc b/quiche/quic/core/quic_write_blocked_list_test.cc
index 4d294f0..784a333 100644
--- a/quiche/quic/core/quic_write_blocked_list_test.cc
+++ b/quiche/quic/core/quic_write_blocked_list_test.cc
@@ -133,8 +133,8 @@
   // Try to add a stream to the write blocked list multiple times at the same
   // priority.
   const QuicStreamId kBlockedId = 3 + 2;
-    write_blocked_list_.RegisterStream(
-        kBlockedId, false, spdy::SpdyStreamPrecedence(kV3HighestPriority));
+  write_blocked_list_.RegisterStream(
+      kBlockedId, false, spdy::SpdyStreamPrecedence(kV3HighestPriority));
   write_blocked_list_.AddStream(kBlockedId);
   write_blocked_list_.AddStream(kBlockedId);
   write_blocked_list_.AddStream(kBlockedId);
diff --git a/quiche/quic/core/stream_delegate_interface.h b/quiche/quic/core/stream_delegate_interface.h
index f93812c..f445fe8 100644
--- a/quiche/quic/core/stream_delegate_interface.h
+++ b/quiche/quic/core/stream_delegate_interface.h
@@ -6,6 +6,7 @@
 #define QUICHE_QUIC_CORE_STREAM_DELEGATE_INTERFACE_H_
 
 #include <cstddef>
+
 #include "absl/types/optional.h"
 #include "quiche/quic/core/quic_types.h"
 #include "quiche/spdy/core/spdy_protocol.h"
@@ -36,21 +37,18 @@
                                       TransmissionType type,
                                       EncryptionLevel level) = 0;
   // Called to write crypto data.
-  virtual size_t SendCryptoData(EncryptionLevel level,
-                                size_t write_length,
+  virtual size_t SendCryptoData(EncryptionLevel level, size_t write_length,
                                 QuicStreamOffset offset,
                                 TransmissionType type) = 0;
   // Called on stream creation.
   virtual void RegisterStreamPriority(
-      QuicStreamId id,
-      bool is_static,
+      QuicStreamId id, bool is_static,
       const spdy::SpdyStreamPrecedence& precedence) = 0;
   // Called on stream destruction to clear priority.
   virtual void UnregisterStreamPriority(QuicStreamId id, bool is_static) = 0;
   // Called by the stream on SetPriority to update priority.
   virtual void UpdateStreamPriority(
-      QuicStreamId id,
-      const spdy::SpdyStreamPrecedence& new_precedence) = 0;
+      QuicStreamId id, const spdy::SpdyStreamPrecedence& new_precedence) = 0;
 };
 
 }  // namespace quic
diff --git a/quiche/quic/core/tls_chlo_extractor.cc b/quiche/quic/core/tls_chlo_extractor.cc
index 4ce60df..046f83d 100644
--- a/quiche/quic/core/tls_chlo_extractor.cc
+++ b/quiche/quic/core/tls_chlo_extractor.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "quiche/quic/core/tls_chlo_extractor.h"
+
 #include <cstring>
 #include <memory>
 
@@ -152,8 +153,7 @@
 }
 
 void TlsChloExtractor::OnUnrecoverableError(
-    QuicErrorCode error,
-    QuicIetfTransportErrorCodes ietf_error,
+    QuicErrorCode error, QuicIetfTransportErrorCodes ietf_error,
     const std::string& details) {
   HandleUnrecoverableError(absl::StrCat(
       "Crypto stream error ", QuicErrorCodeToString(error), "(",
@@ -211,10 +211,8 @@
 
 // static
 int TlsChloExtractor::SetReadSecretCallback(
-    SSL* ssl,
-    enum ssl_encryption_level_t /*level*/,
-    const SSL_CIPHER* /*cipher*/,
-    const uint8_t* /*secret*/,
+    SSL* ssl, enum ssl_encryption_level_t /*level*/,
+    const SSL_CIPHER* /*cipher*/, const uint8_t* /*secret*/,
     size_t /*secret_length*/) {
   GetInstanceFromSSL(ssl)->HandleUnexpectedCallback("SetReadSecretCallback");
   return 0;
@@ -222,10 +220,8 @@
 
 // static
 int TlsChloExtractor::SetWriteSecretCallback(
-    SSL* ssl,
-    enum ssl_encryption_level_t /*level*/,
-    const SSL_CIPHER* /*cipher*/,
-    const uint8_t* /*secret*/,
+    SSL* ssl, enum ssl_encryption_level_t /*level*/,
+    const SSL_CIPHER* /*cipher*/, const uint8_t* /*secret*/,
     size_t /*secret_length*/) {
   GetInstanceFromSSL(ssl)->HandleUnexpectedCallback("SetWriteSecretCallback");
   return 0;
@@ -233,9 +229,7 @@
 
 // static
 int TlsChloExtractor::WriteMessageCallback(
-    SSL* ssl,
-    enum ssl_encryption_level_t /*level*/,
-    const uint8_t* /*data*/,
+    SSL* ssl, enum ssl_encryption_level_t /*level*/, const uint8_t* /*data*/,
     size_t /*len*/) {
   GetInstanceFromSSL(ssl)->HandleUnexpectedCallback("WriteMessageCallback");
   return 0;
diff --git a/quiche/quic/core/tls_chlo_extractor.h b/quiche/quic/core/tls_chlo_extractor.h
index cc7008d..b2cf50c 100644
--- a/quiche/quic/core/tls_chlo_extractor.h
+++ b/quiche/quic/core/tls_chlo_extractor.h
@@ -8,6 +8,7 @@
 #include <memory>
 #include <string>
 #include <vector>
+
 #include "openssl/ssl.h"
 #include "quiche/quic/core/frames/quic_ack_frequency_frame.h"
 #include "quiche/quic/core/quic_framer.h"
@@ -206,23 +207,17 @@
   // BoringSSL static TLS callbacks.
   static enum ssl_select_cert_result_t SelectCertCallback(
       const SSL_CLIENT_HELLO* client_hello);
-  static int SetReadSecretCallback(SSL* ssl,
-                                   enum ssl_encryption_level_t level,
+  static int SetReadSecretCallback(SSL* ssl, enum ssl_encryption_level_t level,
                                    const SSL_CIPHER* cipher,
-                                   const uint8_t* secret,
-                                   size_t secret_length);
-  static int SetWriteSecretCallback(SSL* ssl,
-                                    enum ssl_encryption_level_t level,
+                                   const uint8_t* secret, size_t secret_length);
+  static int SetWriteSecretCallback(SSL* ssl, enum ssl_encryption_level_t level,
                                     const SSL_CIPHER* cipher,
                                     const uint8_t* secret,
                                     size_t secret_length);
-  static int WriteMessageCallback(SSL* ssl,
-                                  enum ssl_encryption_level_t level,
-                                  const uint8_t* data,
-                                  size_t len);
+  static int WriteMessageCallback(SSL* ssl, enum ssl_encryption_level_t level,
+                                  const uint8_t* data, size_t len);
   static int FlushFlightCallback(SSL* ssl);
-  static int SendAlertCallback(SSL* ssl,
-                               enum ssl_encryption_level_t level,
+  static int SendAlertCallback(SSL* ssl, enum ssl_encryption_level_t level,
                                uint8_t desc);
 
   // Called by SelectCertCallback.
diff --git a/quiche/quic/core/tls_chlo_extractor_test.cc b/quiche/quic/core/tls_chlo_extractor_test.cc
index 4728be5..375dd33 100644
--- a/quiche/quic/core/tls_chlo_extractor_test.cc
+++ b/quiche/quic/core/tls_chlo_extractor_test.cc
@@ -129,8 +129,7 @@
   std::vector<std::unique_ptr<QuicReceivedPacket>> packets_;
 };
 
-INSTANTIATE_TEST_SUITE_P(TlsChloExtractorTests,
-                         TlsChloExtractorTest,
+INSTANTIATE_TEST_SUITE_P(TlsChloExtractorTests, TlsChloExtractorTest,
                          ::testing::ValuesIn(AllSupportedVersionsWithTls()),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/tls_client_handshaker.cc b/quiche/quic/core/tls_client_handshaker.cc
index 845992e..90a9d74 100644
--- a/quiche/quic/core/tls_client_handshaker.cc
+++ b/quiche/quic/core/tls_client_handshaker.cc
@@ -22,10 +22,8 @@
 namespace quic {
 
 TlsClientHandshaker::TlsClientHandshaker(
-    const QuicServerId& server_id,
-    QuicCryptoStream* stream,
-    QuicSession* session,
-    std::unique_ptr<ProofVerifyContext> verify_context,
+    const QuicServerId& server_id, QuicCryptoStream* stream,
+    QuicSession* session, std::unique_ptr<ProofVerifyContext> verify_context,
     QuicCryptoClientConfig* crypto_config,
     QuicCryptoClientStream::ProofHandler* proof_handler,
     bool has_application_state)
@@ -319,9 +317,7 @@
   return true;
 }
 
-int TlsClientHandshaker::num_sent_client_hellos() const {
-  return 0;
-}
+int TlsClientHandshaker::num_sent_client_hellos() const { return 0; }
 
 bool TlsClientHandshaker::IsResumption() const {
   QUIC_BUG_IF(quic_bug_12736_1, !one_rtt_keys_available());
@@ -348,9 +344,7 @@
   return 0;
 }
 
-std::string TlsClientHandshaker::chlo_hash() const {
-  return "";
-}
+std::string TlsClientHandshaker::chlo_hash() const { return ""; }
 
 bool TlsClientHandshaker::ExportKeyingMaterial(absl::string_view label,
                                                absl::string_view context,
@@ -376,9 +370,7 @@
   return TlsHandshaker::crypto_message_parser();
 }
 
-HandshakeState TlsClientHandshaker::GetHandshakeState() const {
-  return state_;
-}
+HandshakeState TlsClientHandshaker::GetHandshakeState() const { return state_; }
 
 size_t TlsClientHandshaker::BufferSizeLimitForLevel(
     EncryptionLevel level) const {
@@ -432,8 +424,7 @@
 }
 
 void TlsClientHandshaker::SetWriteSecret(
-    EncryptionLevel level,
-    const SSL_CIPHER* cipher,
+    EncryptionLevel level, const SSL_CIPHER* cipher,
     const std::vector<uint8_t>& write_secret) {
   if (is_connection_closed()) {
     return;
@@ -458,10 +449,8 @@
 }
 
 QuicAsyncStatus TlsClientHandshaker::VerifyCertChain(
-    const std::vector<std::string>& certs,
-    std::string* error_details,
-    std::unique_ptr<ProofVerifyDetails>* details,
-    uint8_t* out_alert,
+    const std::vector<std::string>& certs, std::string* error_details,
+    std::unique_ptr<ProofVerifyDetails>* details, uint8_t* out_alert,
     std::unique_ptr<ProofVerifierCallback> callback) {
   const uint8_t* ocsp_response_raw;
   size_t ocsp_response_len;
diff --git a/quiche/quic/core/tls_client_handshaker.h b/quiche/quic/core/tls_client_handshaker.h
index 7349ae2..15727e1 100644
--- a/quiche/quic/core/tls_client_handshaker.h
+++ b/quiche/quic/core/tls_client_handshaker.h
@@ -29,8 +29,7 @@
       public TlsClientConnection::Delegate {
  public:
   // |crypto_config| must outlive TlsClientHandshaker.
-  TlsClientHandshaker(const QuicServerId& server_id,
-                      QuicCryptoStream* stream,
+  TlsClientHandshaker(const QuicServerId& server_id, QuicCryptoStream* stream,
                       QuicSession* session,
                       std::unique_ptr<ProofVerifyContext> verify_context,
                       QuicCryptoClientConfig* crypto_config,
@@ -70,8 +69,7 @@
                           ConnectionCloseSource source) override;
   void OnHandshakeDoneReceived() override;
   void OnNewTokenReceived(absl::string_view token) override;
-  void SetWriteSecret(EncryptionLevel level,
-                      const SSL_CIPHER* cipher,
+  void SetWriteSecret(EncryptionLevel level, const SSL_CIPHER* cipher,
                       const std::vector<uint8_t>& write_secret) override;
 
   // Override to drop initial keys if trying to write ENCRYPTION_HANDSHAKE data.
@@ -97,10 +95,8 @@
   void ProcessPostHandshakeMessage() override;
   bool ShouldCloseConnectionOnUnexpectedError(int ssl_error) override;
   QuicAsyncStatus VerifyCertChain(
-      const std::vector<std::string>& certs,
-      std::string* error_details,
-      std::unique_ptr<ProofVerifyDetails>* details,
-      uint8_t* out_alert,
+      const std::vector<std::string>& certs, std::string* error_details,
+      std::unique_ptr<ProofVerifyDetails>* details, uint8_t* out_alert,
       std::unique_ptr<ProofVerifierCallback> callback) override;
   void OnProofVerifyDetailsAvailable(
       const ProofVerifyDetails& verify_details) override;
diff --git a/quiche/quic/core/tls_client_handshaker_test.cc b/quiche/quic/core/tls_client_handshaker_test.cc
index e77b7af..91593d6 100644
--- a/quiche/quic/core/tls_client_handshaker_test.cc
+++ b/quiche/quic/core/tls_client_handshaker_test.cc
@@ -48,16 +48,11 @@
       : verifier_(crypto_test_utils::ProofVerifierForTesting()) {}
 
   QuicAsyncStatus VerifyProof(
-      const std::string& hostname,
-      const uint16_t port,
-      const std::string& server_config,
-      QuicTransportVersion quic_version,
-      absl::string_view chlo_hash,
-      const std::vector<std::string>& certs,
-      const std::string& cert_sct,
-      const std::string& signature,
-      const ProofVerifyContext* context,
-      std::string* error_details,
+      const std::string& hostname, const uint16_t port,
+      const std::string& server_config, QuicTransportVersion quic_version,
+      absl::string_view chlo_hash, const std::vector<std::string>& certs,
+      const std::string& cert_sct, const std::string& signature,
+      const ProofVerifyContext* context, std::string* error_details,
       std::unique_ptr<ProofVerifyDetails>* details,
       std::unique_ptr<ProofVerifierCallback> callback) override {
     return verifier_->VerifyProof(
@@ -66,14 +61,10 @@
   }
 
   QuicAsyncStatus VerifyCertChain(
-      const std::string& hostname,
-      const uint16_t port,
-      const std::vector<std::string>& certs,
-      const std::string& ocsp_response,
-      const std::string& cert_sct,
-      const ProofVerifyContext* context,
-      std::string* error_details,
-      std::unique_ptr<ProofVerifyDetails>* details,
+      const std::string& hostname, const uint16_t port,
+      const std::vector<std::string>& certs, const std::string& ocsp_response,
+      const std::string& cert_sct, const ProofVerifyContext* context,
+      std::string* error_details, std::unique_ptr<ProofVerifyDetails>* details,
       uint8_t* out_alert,
       std::unique_ptr<ProofVerifierCallback> callback) override {
     if (!active_) {
@@ -107,8 +98,7 @@
   // run.
   class FailingProofVerifierCallback : public ProofVerifierCallback {
    public:
-    void Run(bool /*ok*/,
-             const std::string& /*error_details*/,
+    void Run(bool /*ok*/, const std::string& /*error_details*/,
              std::unique_ptr<ProofVerifyDetails>* /*details*/) override {
       FAIL();
     }
@@ -116,8 +106,7 @@
 
   class VerifyChainPendingOp {
    public:
-    VerifyChainPendingOp(const std::string& hostname,
-                         const uint16_t port,
+    VerifyChainPendingOp(const std::string& hostname, const uint16_t port,
                          const std::vector<std::string>& certs,
                          const std::string& ocsp_response,
                          const std::string& cert_sct,
@@ -258,8 +247,7 @@
   QuicCompressedCertsCache server_compressed_certs_cache_;
 };
 
-INSTANTIATE_TEST_SUITE_P(TlsHandshakerTests,
-                         TlsClientHandshakerTest,
+INSTANTIATE_TEST_SUITE_P(TlsHandshakerTests, TlsClientHandshakerTest,
                          ::testing::ValuesIn(AllSupportedVersionsWithTls()),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/tls_handshaker.h b/quiche/quic/core/tls_handshaker.h
index 0e37978..ddd44c6 100644
--- a/quiche/quic/core/tls_handshaker.h
+++ b/quiche/quic/core/tls_handshaker.h
@@ -111,10 +111,8 @@
   // certificate_unknown. Implementations of VerifyCertChain may retain the
   // |out_alert| pointer while performing an async operation.
   virtual QuicAsyncStatus VerifyCertChain(
-      const std::vector<std::string>& certs,
-      std::string* error_details,
-      std::unique_ptr<ProofVerifyDetails>* details,
-      uint8_t* out_alert,
+      const std::vector<std::string>& certs, std::string* error_details,
+      std::unique_ptr<ProofVerifyDetails>* details, uint8_t* out_alert,
       std::unique_ptr<ProofVerifierCallback> callback) = 0;
   // Called when certificate verification is completed.
   virtual void OnProofVerifyDetailsAvailable(
@@ -139,16 +137,14 @@
   // 1.3 key schedule (RFC 8446 section 7.1), in particular the handshake
   // traffic secrets and application traffic secrets. The provided write secret
   // must be used with the provided cipher suite |cipher|.
-  void SetWriteSecret(EncryptionLevel level,
-                      const SSL_CIPHER* cipher,
+  void SetWriteSecret(EncryptionLevel level, const SSL_CIPHER* cipher,
                       const std::vector<uint8_t>& write_secret) override;
 
   // SetReadSecret is similar to SetWriteSecret, except that it is used for
   // decrypting messages. SetReadSecret at a particular level is always called
   // after SetWriteSecret for that level, except for ENCRYPTION_ZERO_RTT, where
   // the EncryptionLevel for SetWriteSecret is ENCRYPTION_FORWARD_SECURE.
-  bool SetReadSecret(EncryptionLevel level,
-                     const SSL_CIPHER* cipher,
+  bool SetReadSecret(EncryptionLevel level, const SSL_CIPHER* cipher,
                      const std::vector<uint8_t>& read_secret) override;
 
   // WriteMessage is called when there is |data| from the TLS stack ready for
@@ -180,8 +176,7 @@
     ~ProofVerifierCallbackImpl() override;
 
     // ProofVerifierCallback interface.
-    void Run(bool ok,
-             const std::string& error_details,
+    void Run(bool ok, const std::string& error_details,
              std::unique_ptr<ProofVerifyDetails>* details) override;
 
     // If called, Cancel causes the pending callback to be a no-op.
diff --git a/quiche/quic/core/tls_server_handshaker.cc b/quiche/quic/core/tls_server_handshaker.cc
index cc6fc23..ce63767 100644
--- a/quiche/quic/core/tls_server_handshaker.cc
+++ b/quiche/quic/core/tls_server_handshaker.cc
@@ -42,8 +42,7 @@
 }  // namespace
 
 TlsServerHandshaker::DefaultProofSourceHandle::DefaultProofSourceHandle(
-    TlsServerHandshaker* handshaker,
-    ProofSource* proof_source)
+    TlsServerHandshaker* handshaker, ProofSource* proof_source)
     : handshaker_(handshaker), proof_source_(proof_source) {}
 
 TlsServerHandshaker::DefaultProofSourceHandle::~DefaultProofSourceHandle() {
@@ -63,10 +62,8 @@
 TlsServerHandshaker::DefaultProofSourceHandle::SelectCertificate(
     const QuicSocketAddress& server_address,
     const QuicSocketAddress& client_address,
-    absl::string_view /*ssl_capabilities*/,
-    const std::string& hostname,
-    absl::string_view /*client_hello*/,
-    const std::string& /*alpn*/,
+    absl::string_view /*ssl_capabilities*/, const std::string& hostname,
+    absl::string_view /*client_hello*/, const std::string& /*alpn*/,
     absl::optional<std::string> /*alps*/,
     const std::vector<uint8_t>& /*quic_transport_params*/,
     const absl::optional<std::vector<uint8_t>>& /*early_data_context*/,
@@ -98,10 +95,8 @@
 
 QuicAsyncStatus TlsServerHandshaker::DefaultProofSourceHandle::ComputeSignature(
     const QuicSocketAddress& server_address,
-    const QuicSocketAddress& client_address,
-    const std::string& hostname,
-    uint16_t signature_algorithm,
-    absl::string_view in,
+    const QuicSocketAddress& client_address, const std::string& hostname,
+    uint16_t signature_algorithm, absl::string_view in,
     size_t max_signature_size) {
   if (!handshaker_ || !proof_source_) {
     QUIC_BUG(quic_bug_10341_2)
@@ -326,9 +321,7 @@
   }
 }
 
-void TlsServerHandshaker::OnHandshakeDoneReceived() {
-  QUICHE_DCHECK(false);
-}
+void TlsServerHandshaker::OnHandshakeDoneReceived() { QUICHE_DCHECK(false); }
 
 void TlsServerHandshaker::OnNewTokenReceived(absl::string_view /*token*/) {
   QUICHE_DCHECK(false);
@@ -368,9 +361,7 @@
   return true;
 }
 
-bool TlsServerHandshaker::ShouldSendExpectCTHeader() const {
-  return false;
-}
+bool TlsServerHandshaker::ShouldSendExpectCTHeader() const { return false; }
 
 bool TlsServerHandshaker::DidCertMatchSni() const { return cert_matched_sni_; }
 
@@ -411,9 +402,7 @@
   return TlsHandshaker::crypto_message_parser();
 }
 
-HandshakeState TlsServerHandshaker::GetHandshakeState() const {
-  return state_;
-}
+HandshakeState TlsServerHandshaker::GetHandshakeState() const { return state_; }
 
 void TlsServerHandshaker::SetServerApplicationStateForResumption(
     std::unique_ptr<ApplicationState> state) {
@@ -447,8 +436,7 @@
 }
 
 bool TlsServerHandshaker::ProcessTransportParameters(
-    const SSL_CLIENT_HELLO* client_hello,
-    std::string* error_details) {
+    const SSL_CLIENT_HELLO* client_hello, std::string* error_details) {
   TransportParameters client_params;
   const uint8_t* client_params_bytes;
   size_t params_bytes_len;
@@ -568,8 +556,7 @@
 }
 
 void TlsServerHandshaker::SetWriteSecret(
-    EncryptionLevel level,
-    const SSL_CIPHER* cipher,
+    EncryptionLevel level, const SSL_CIPHER* cipher,
     const std::vector<uint8_t>& write_secret) {
   if (is_connection_closed()) {
     return;
@@ -622,10 +609,8 @@
 }
 
 QuicAsyncStatus TlsServerHandshaker::VerifyCertChain(
-    const std::vector<std::string>& /*certs*/,
-    std::string* /*error_details*/,
-    std::unique_ptr<ProofVerifyDetails>* /*details*/,
-    uint8_t* /*out_alert*/,
+    const std::vector<std::string>& /*certs*/, std::string* /*error_details*/,
+    std::unique_ptr<ProofVerifyDetails>* /*details*/, uint8_t* /*out_alert*/,
     std::unique_ptr<ProofVerifierCallback> /*callback*/) {
   if (!session()->support_client_cert()) {
     QUIC_BUG(quic_bug_10341_5)
@@ -645,10 +630,7 @@
     const ProofVerifyDetails& /*verify_details*/) {}
 
 ssl_private_key_result_t TlsServerHandshaker::PrivateKeySign(
-    uint8_t* out,
-    size_t* out_len,
-    size_t max_out,
-    uint16_t sig_alg,
+    uint8_t* out, size_t* out_len, size_t max_out, uint16_t sig_alg,
     absl::string_view in) {
   QUICHE_DCHECK_EQ(expected_ssl_error(), SSL_ERROR_WANT_READ);
 
@@ -669,9 +651,7 @@
 }
 
 ssl_private_key_result_t TlsServerHandshaker::PrivateKeyComplete(
-    uint8_t* out,
-    size_t* out_len,
-    size_t max_out) {
+    uint8_t* out, size_t* out_len, size_t max_out) {
   if (expected_ssl_error() == SSL_ERROR_WANT_PRIVATE_KEY_OPERATION) {
     return ssl_private_key_retry;
   }
@@ -702,9 +682,7 @@
 }
 
 void TlsServerHandshaker::OnComputeSignatureDone(
-    bool ok,
-    bool is_sync,
-    std::string signature,
+    bool ok, bool is_sync, std::string signature,
     std::unique_ptr<ProofSource::Details> details) {
   QUIC_DVLOG(1) << "OnComputeSignatureDone. ok:" << ok
                 << ", is_sync:" << is_sync
@@ -741,8 +719,7 @@
   return proof_source_->GetTicketCrypter()->MaxOverhead();
 }
 
-int TlsServerHandshaker::SessionTicketSeal(uint8_t* out,
-                                           size_t* out_len,
+int TlsServerHandshaker::SessionTicketSeal(uint8_t* out, size_t* out_len,
                                            size_t max_out_len,
                                            absl::string_view in) {
   QUICHE_DCHECK(proof_source_->GetTicketCrypter());
@@ -762,10 +739,7 @@
 }
 
 ssl_ticket_aead_result_t TlsServerHandshaker::SessionTicketOpen(
-    uint8_t* out,
-    size_t* out_len,
-    size_t max_out_len,
-    absl::string_view in) {
+    uint8_t* out, size_t* out_len, size_t max_out_len, absl::string_view in) {
   QUICHE_DCHECK(proof_source_->GetTicketCrypter());
 
   if (ignore_ticket_open_) {
@@ -828,9 +802,7 @@
 }
 
 ssl_ticket_aead_result_t TlsServerHandshaker::FinalizeSessionTicketOpen(
-    uint8_t* out,
-    size_t* out_len,
-    size_t max_out_len) {
+    uint8_t* out, size_t* out_len, size_t max_out_len) {
   ticket_decryption_callback_ = nullptr;
   set_expected_ssl_error(SSL_ERROR_WANT_READ);
   if (decrypted_session_ticket_.empty()) {
@@ -1081,10 +1053,8 @@
   return SSL_TLSEXT_ERR_OK;
 }
 
-int TlsServerHandshaker::SelectAlpn(const uint8_t** out,
-                                    uint8_t* out_len,
-                                    const uint8_t* in,
-                                    unsigned in_len) {
+int TlsServerHandshaker::SelectAlpn(const uint8_t** out, uint8_t* out_len,
+                                    const uint8_t* in, unsigned in_len) {
   // |in| contains a sequence of 1-byte-length-prefixed values.
   *out_len = 0;
   *out = nullptr;
diff --git a/quiche/quic/core/tls_server_handshaker.h b/quiche/quic/core/tls_server_handshaker.h
index 9d005ed..6385eda 100644
--- a/quiche/quic/core/tls_server_handshaker.h
+++ b/quiche/quic/core/tls_server_handshaker.h
@@ -86,8 +86,7 @@
   std::unique_ptr<QuicDecrypter> AdvanceKeysAndCreateCurrentOneRttDecrypter()
       override;
   std::unique_ptr<QuicEncrypter> CreateCurrentOneRttEncrypter() override;
-  void SetWriteSecret(EncryptionLevel level,
-                      const SSL_CIPHER* cipher,
+  void SetWriteSecret(EncryptionLevel level, const SSL_CIPHER* cipher,
                       const std::vector<uint8_t>& write_secret) override;
 
   // Called with normalized SNI hostname as |hostname|.  Return value will be
@@ -128,10 +127,8 @@
   void FinishHandshake() override;
   void ProcessPostHandshakeMessage() override {}
   QuicAsyncStatus VerifyCertChain(
-      const std::vector<std::string>& certs,
-      std::string* error_details,
-      std::unique_ptr<ProofVerifyDetails>* details,
-      uint8_t* out_alert,
+      const std::vector<std::string>& certs, std::string* error_details,
+      std::unique_ptr<ProofVerifyDetails>* details, uint8_t* out_alert,
       std::unique_ptr<ProofVerifierCallback> callback) override;
   void OnProofVerifyDetailsAvailable(
       const ProofVerifyDetails& verify_details) override;
@@ -141,25 +138,17 @@
   ssl_select_cert_result_t EarlySelectCertCallback(
       const SSL_CLIENT_HELLO* client_hello) override;
   int TlsExtServernameCallback(int* out_alert) override;
-  int SelectAlpn(const uint8_t** out,
-                 uint8_t* out_len,
-                 const uint8_t* in,
+  int SelectAlpn(const uint8_t** out, uint8_t* out_len, const uint8_t* in,
                  unsigned in_len) override;
-  ssl_private_key_result_t PrivateKeySign(uint8_t* out,
-                                          size_t* out_len,
-                                          size_t max_out,
-                                          uint16_t sig_alg,
+  ssl_private_key_result_t PrivateKeySign(uint8_t* out, size_t* out_len,
+                                          size_t max_out, uint16_t sig_alg,
                                           absl::string_view in) override;
-  ssl_private_key_result_t PrivateKeyComplete(uint8_t* out,
-                                              size_t* out_len,
+  ssl_private_key_result_t PrivateKeyComplete(uint8_t* out, size_t* out_len,
                                               size_t max_out) override;
   size_t SessionTicketMaxOverhead() override;
-  int SessionTicketSeal(uint8_t* out,
-                        size_t* out_len,
-                        size_t max_out_len,
+  int SessionTicketSeal(uint8_t* out, size_t* out_len, size_t max_out_len,
                         absl::string_view in) override;
-  ssl_ticket_aead_result_t SessionTicketOpen(uint8_t* out,
-                                             size_t* out_len,
+  ssl_ticket_aead_result_t SessionTicketOpen(uint8_t* out, size_t* out_len,
                                              size_t max_out_len,
                                              absl::string_view in) override;
   // Called when ticket_decryption_callback_ is done to determine a final
@@ -188,9 +177,7 @@
       QuicDelayedSSLConfig delayed_ssl_config) override;
 
   void OnComputeSignatureDone(
-      bool ok,
-      bool is_sync,
-      std::string signature,
+      bool ok, bool is_sync, std::string signature,
       std::unique_ptr<ProofSource::Details> details) override;
 
   void set_encryption_established(bool encryption_established) {
@@ -238,10 +225,8 @@
     QuicAsyncStatus SelectCertificate(
         const QuicSocketAddress& server_address,
         const QuicSocketAddress& client_address,
-        absl::string_view ssl_capabilities,
-        const std::string& hostname,
-        absl::string_view client_hello,
-        const std::string& alpn,
+        absl::string_view ssl_capabilities, const std::string& hostname,
+        absl::string_view client_hello, const std::string& alpn,
         absl::optional<std::string> alps,
         const std::vector<uint8_t>& quic_transport_params,
         const absl::optional<std::vector<uint8_t>>& early_data_context,
@@ -266,8 +251,7 @@
       explicit DefaultSignatureCallback(DefaultProofSourceHandle* handle)
           : handle_(handle) {}
 
-      void Run(bool ok,
-               std::string signature,
+      void Run(bool ok, std::string signature,
                std::unique_ptr<ProofSource::Details> details) override {
         if (handle_ == nullptr) {
           // Operation has been canceled, or Run has been called.
diff --git a/quiche/quic/core/tls_server_handshaker_test.cc b/quiche/quic/core/tls_server_handshaker_test.cc
index b903821..34ec60c 100644
--- a/quiche/quic/core/tls_server_handshaker_test.cc
+++ b/quiche/quic/core/tls_server_handshaker_test.cc
@@ -88,10 +88,8 @@
             this, &TestTlsServerHandshaker::RealOverrideQuicConfigDefaults));
   }
 
-  MOCK_METHOD(std::unique_ptr<ProofSourceHandle>,
-              MaybeCreateProofSourceHandle,
-              (),
-              (override));
+  MOCK_METHOD(std::unique_ptr<ProofSourceHandle>, MaybeCreateProofSourceHandle,
+              (), (override));
 
   MOCK_METHOD(void, OverrideQuicConfigDefaults, (QuicConfig * config),
               (override));
@@ -446,8 +444,7 @@
   ParsedQuicVersionVector supported_versions_;
 };
 
-INSTANTIATE_TEST_SUITE_P(TlsServerHandshakerTests,
-                         TlsServerHandshakerTest,
+INSTANTIATE_TEST_SUITE_P(TlsServerHandshakerTests, TlsServerHandshakerTest,
                          ::testing::ValuesIn(GetTestParams()),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/uber_quic_stream_id_manager.cc b/quiche/quic/core/uber_quic_stream_id_manager.cc
index f659291..2c8b1a5 100644
--- a/quiche/quic/core/uber_quic_stream_id_manager.cc
+++ b/quiche/quic/core/uber_quic_stream_id_manager.cc
@@ -10,8 +10,7 @@
 namespace quic {
 
 UberQuicStreamIdManager::UberQuicStreamIdManager(
-    Perspective perspective,
-    ParsedQuicVersion version,
+    Perspective perspective, ParsedQuicVersion version,
     QuicStreamIdManager::DelegateInterface* delegate,
     QuicStreamCount max_open_outgoing_bidirectional_streams,
     QuicStreamCount max_open_outgoing_unidirectional_streams,
@@ -19,16 +18,13 @@
     QuicStreamCount max_open_incoming_unidirectional_streams)
     : version_(version),
       bidirectional_stream_id_manager_(delegate,
-                                       /*unidirectional=*/false,
-                                       perspective,
+                                       /*unidirectional=*/false, perspective,
                                        version,
                                        max_open_outgoing_bidirectional_streams,
                                        max_open_incoming_bidirectional_streams),
       unidirectional_stream_id_manager_(
           delegate,
-          /*unidirectional=*/true,
-          perspective,
-          version,
+          /*unidirectional=*/true, perspective, version,
           max_open_outgoing_unidirectional_streams,
           max_open_incoming_unidirectional_streams) {}
 
@@ -68,8 +64,7 @@
 }
 
 bool UberQuicStreamIdManager::MaybeIncreaseLargestPeerStreamId(
-    QuicStreamId id,
-    std::string* error_details) {
+    QuicStreamId id, std::string* error_details) {
   if (QuicUtils::IsBidirectionalStreamId(id, version_)) {
     return bidirectional_stream_id_manager_.MaybeIncreaseLargestPeerStreamId(
         id, error_details);
@@ -87,8 +82,7 @@
 }
 
 bool UberQuicStreamIdManager::OnStreamsBlockedFrame(
-    const QuicStreamsBlockedFrame& frame,
-    std::string* error_details) {
+    const QuicStreamsBlockedFrame& frame, std::string* error_details) {
   if (frame.unidirectional) {
     return unidirectional_stream_id_manager_.OnStreamsBlockedFrame(
         frame, error_details);
diff --git a/quiche/quic/core/uber_quic_stream_id_manager.h b/quiche/quic/core/uber_quic_stream_id_manager.h
index 7af942a..e6b73d0 100644
--- a/quiche/quic/core/uber_quic_stream_id_manager.h
+++ b/quiche/quic/core/uber_quic_stream_id_manager.h
@@ -22,8 +22,7 @@
 class QUIC_EXPORT_PRIVATE UberQuicStreamIdManager {
  public:
   UberQuicStreamIdManager(
-      Perspective perspective,
-      ParsedQuicVersion version,
+      Perspective perspective, ParsedQuicVersion version,
       QuicStreamIdManager::DelegateInterface* delegate,
       QuicStreamCount max_open_outgoing_bidirectional_streams,
       QuicStreamCount max_open_outgoing_unidirectional_streams,
diff --git a/quiche/quic/core/uber_quic_stream_id_manager_test.cc b/quiche/quic/core/uber_quic_stream_id_manager_test.cc
index 4f7562b..dee343c 100644
--- a/quiche/quic/core/uber_quic_stream_id_manager_test.cc
+++ b/quiche/quic/core/uber_quic_stream_id_manager_test.cc
@@ -46,20 +46,14 @@
 
 class MockDelegate : public QuicStreamIdManager::DelegateInterface {
  public:
-  MOCK_METHOD(void,
-              SendMaxStreams,
-              (QuicStreamCount stream_count, bool unidirectional),
-              (override));
+  MOCK_METHOD(void, SendMaxStreams,
+              (QuicStreamCount stream_count, bool unidirectional), (override));
 };
 
 class UberQuicStreamIdManagerTest : public QuicTestWithParam<TestParams> {
  protected:
   UberQuicStreamIdManagerTest()
-      : manager_(perspective(),
-                 version(),
-                 &delegate_,
-                 0,
-                 0,
+      : manager_(perspective(), version(), &delegate_, 0, 0,
                  kDefaultMaxStreamsPerConnection,
                  kDefaultMaxStreamsPerConnection) {}
 
@@ -109,8 +103,7 @@
   }
 
   QuicStreamId StreamCountToId(QuicStreamCount stream_count,
-                               Perspective perspective,
-                               bool bidirectional) {
+                               Perspective perspective, bool bidirectional) {
     return ((bidirectional) ? QuicUtils::GetFirstBidirectionalStreamId(
                                   transport_version(), perspective)
                             : QuicUtils::GetFirstUnidirectionalStreamId(
@@ -129,8 +122,7 @@
   UberQuicStreamIdManager manager_;
 };
 
-INSTANTIATE_TEST_SUITE_P(Tests,
-                         UberQuicStreamIdManagerTest,
+INSTANTIATE_TEST_SUITE_P(Tests, UberQuicStreamIdManagerTest,
                          ::testing::ValuesIn(GetTestParams()),
                          ::testing::PrintToStringParamName());
 
diff --git a/quiche/quic/core/uber_received_packet_manager.cc b/quiche/quic/core/uber_received_packet_manager.cc
index b6a7eb2..2456795 100644
--- a/quiche/quic/core/uber_received_packet_manager.cc
+++ b/quiche/quic/core/uber_received_packet_manager.cc
@@ -38,8 +38,7 @@
 }
 
 const QuicFrame UberReceivedPacketManager::GetUpdatedAckFrame(
-    PacketNumberSpace packet_number_space,
-    QuicTime approximate_now) {
+    PacketNumberSpace packet_number_space, QuicTime approximate_now) {
   if (!supports_multiple_packet_number_spaces_) {
     return received_packet_managers_[0].GetUpdatedAckFrame(approximate_now);
   }
@@ -48,8 +47,7 @@
 }
 
 void UberReceivedPacketManager::RecordPacketReceived(
-    EncryptionLevel decrypted_packet_level,
-    const QuicPacketHeader& header,
+    EncryptionLevel decrypted_packet_level, const QuicPacketHeader& header,
     QuicTime receipt_time) {
   if (!supports_multiple_packet_number_spaces_) {
     received_packet_managers_[0].RecordPacketReceived(header, receipt_time);
@@ -61,8 +59,7 @@
 }
 
 void UberReceivedPacketManager::DontWaitForPacketsBefore(
-    EncryptionLevel decrypted_packet_level,
-    QuicPacketNumber least_unacked) {
+    EncryptionLevel decrypted_packet_level, QuicPacketNumber least_unacked) {
   if (!supports_multiple_packet_number_spaces_) {
     received_packet_managers_[0].DontWaitForPacketsBefore(least_unacked);
     return;
diff --git a/quiche/quic/core/uber_received_packet_manager_test.cc b/quiche/quic/core/uber_received_packet_manager_test.cc
index 96b951f..030e55c 100644
--- a/quiche/quic/core/uber_received_packet_manager_test.cc
+++ b/quiche/quic/core/uber_received_packet_manager_test.cc
@@ -57,8 +57,7 @@
   }
 
   void RecordPacketReceipt(EncryptionLevel decrypted_packet_level,
-                           uint64_t packet_number,
-                           QuicTime receipt_time) {
+                           uint64_t packet_number, QuicTime receipt_time) {
     QuicPacketHeader header;
     header.packet_number = QuicPacketNumber(packet_number);
     manager_->RecordPacketReceived(decrypted_packet_level, header,
