Rename QUIC connection ID to server connection ID, part 2

This is part of a larger body of work required to enable client connection IDs.

gfe-relnote: n/a, code-rename-only change
PiperOrigin-RevId: 250386523
Change-Id: I20d5a688e040791eefda378f5246adfa770cef61
diff --git a/quic/core/http/end_to_end_test.cc b/quic/core/http/end_to_end_test.cc
index c751cf8..faee164 100644
--- a/quic/core/http/end_to_end_test.cc
+++ b/quic/core/http/end_to_end_test.cc
@@ -211,8 +211,8 @@
         chlo_multiplier_(0),
         stream_factory_(nullptr),
         support_server_push_(false),
-        override_connection_id_(nullptr),
-        expected_connection_id_length_(kQuicDefaultConnectionIdLength) {
+        override_server_connection_id_(nullptr),
+        expected_server_connection_id_length_(kQuicDefaultConnectionIdLength) {
     SetQuicFlag(FLAGS_quic_supports_tls_handshake, true);
     SetQuicRestartFlag(quic_no_server_conn_ver_negotiation2, true);
     SetQuicReloadableFlag(quic_no_client_conn_ver_negotiation, true);
@@ -259,8 +259,8 @@
     if (!pre_shared_key_client_.empty()) {
       client->client()->SetPreSharedKey(pre_shared_key_client_);
     }
-    if (override_connection_id_ != nullptr) {
-      client->UseConnectionId(*override_connection_id_);
+    if (override_server_connection_id_ != nullptr) {
+      client->UseConnectionId(*override_server_connection_id_);
     }
     client->Connect();
     return client;
@@ -375,7 +375,7 @@
     auto* test_server = new QuicTestServer(
         crypto_test_utils::ProofSourceForTesting(), server_config_,
         server_supported_versions_, &memory_cache_backend_,
-        expected_connection_id_length_);
+        expected_server_connection_id_length_);
     server_thread_ = QuicMakeUnique<ServerThread>(test_server, server_address_);
     if (chlo_multiplier_ != 0) {
       server_thread_->server()->SetChloMultiplier(chlo_multiplier_);
@@ -538,8 +538,8 @@
   bool support_server_push_;
   std::string pre_shared_key_client_;
   std::string pre_shared_key_server_;
-  QuicConnectionId* override_connection_id_;
-  uint8_t expected_connection_id_length_;
+  QuicConnectionId* override_server_connection_id_;
+  uint8_t expected_server_connection_id_length_;
 };
 
 // Run all end to end tests with all supported versions.
@@ -603,8 +603,8 @@
 TEST_P(EndToEndTest, SimpleRequestResponseZeroConnectionID) {
   QuicConnectionId connection_id = QuicUtils::CreateZeroConnectionId(
       GetParam().negotiated_version.transport_version);
-  override_connection_id_ = &connection_id;
-  expected_connection_id_length_ = connection_id.length();
+  override_server_connection_id_ = &connection_id;
+  expected_server_connection_id_length_ = connection_id.length();
   ASSERT_TRUE(Initialize());
 
   EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
@@ -628,7 +628,7 @@
   }
   QuicConnectionId connection_id =
       TestConnectionIdNineBytesLong(UINT64_C(0xBADbadBADbad));
-  override_connection_id_ = &connection_id;
+  override_server_connection_id_ = &connection_id;
   ASSERT_TRUE(Initialize());
   EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
   EXPECT_EQ("200", client_->response_headers()->find(":status")->second);
@@ -654,7 +654,7 @@
                                     QuicVersionReservedForNegotiation());
   QuicConnectionId connection_id =
       TestConnectionIdNineBytesLong(UINT64_C(0xBADbadBADbad));
-  override_connection_id_ = &connection_id;
+  override_server_connection_id_ = &connection_id;
   ASSERT_TRUE(Initialize());
   ASSERT_TRUE(ServerSendsVersionNegotiation());
   EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
@@ -676,9 +676,9 @@
   // Start client_ which will use a bad connection ID length.
   QuicConnectionId connection_id =
       TestConnectionIdNineBytesLong(UINT64_C(0xBADbadBADbad));
-  override_connection_id_ = &connection_id;
+  override_server_connection_id_ = &connection_id;
   ASSERT_TRUE(Initialize());
-  override_connection_id_ = nullptr;
+  override_server_connection_id_ = nullptr;
 
   // Start client2 which will use a good connection ID length.
   std::unique_ptr<QuicTestClient> client2(CreateQuicClient(nullptr));
@@ -783,8 +783,8 @@
 TEST_P(EndToEndTest, MultipleRequestResponseZeroConnectionID) {
   QuicConnectionId connection_id = QuicUtils::CreateZeroConnectionId(
       GetParam().negotiated_version.transport_version);
-  override_connection_id_ = &connection_id;
-  expected_connection_id_length_ = connection_id.length();
+  override_server_connection_id_ = &connection_id;
+  expected_server_connection_id_length_ = connection_id.length();
   ASSERT_TRUE(Initialize());
 
   EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo"));
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index 6afc62d..226a4cc 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -376,8 +376,7 @@
   if (use_uber_received_packet_manager_) {
     QUIC_RELOADABLE_FLAG_COUNT(quic_use_uber_received_packet_manager);
   }
-  QUIC_DLOG(INFO) << ENDPOINT
-                  << "Created connection with server connection_id: "
+  QUIC_DLOG(INFO) << ENDPOINT << "Created connection with server connection ID "
                   << server_connection_id
                   << " and version: " << ParsedQuicVersionToString(version());
 
diff --git a/quic/core/quic_dispatcher.cc b/quic/core/quic_dispatcher.cc
index 796b2dc..63a64c9 100644
--- a/quic/core/quic_dispatcher.cc
+++ b/quic/core/quic_dispatcher.cc
@@ -237,7 +237,7 @@
     std::unique_ptr<QuicConnectionHelperInterface> helper,
     std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
     std::unique_ptr<QuicAlarmFactory> alarm_factory,
-    uint8_t expected_connection_id_length)
+    uint8_t expected_server_connection_id_length)
     : config_(config),
       crypto_config_(crypto_config),
       compressed_certs_cache_(
@@ -253,14 +253,15 @@
       framer_(GetSupportedVersions(),
               /*unused*/ QuicTime::Zero(),
               Perspective::IS_SERVER,
-              expected_connection_id_length),
+              expected_server_connection_id_length),
       last_error_(QUIC_NO_ERROR),
       new_sessions_allowed_per_event_loop_(0u),
       accept_new_connections_(true),
       allow_short_initial_server_connection_ids_(false),
       last_version_label_(0),
-      expected_connection_id_length_(expected_connection_id_length),
-      should_update_expected_connection_id_length_(false),
+      expected_server_connection_id_length_(
+          expected_server_connection_id_length),
+      should_update_expected_server_connection_id_length_(false),
       no_framer_(GetQuicRestartFlag(quic_no_framer_object_in_dispatcher)) {
   if (!no_framer_) {
     framer_.set_visitor(this);
@@ -304,7 +305,7 @@
   uint8_t destination_connection_id_length;
   std::string detailed_error;
   const QuicErrorCode error = QuicFramer::ProcessPacketDispatcher(
-      packet, expected_connection_id_length_, &header.form,
+      packet, expected_server_connection_id_length_, &header.form,
       &header.version_flag, &last_version_label_,
       &destination_connection_id_length, &header.destination_connection_id,
       &detailed_error);
@@ -315,16 +316,17 @@
     return;
   }
   header.version = ParseQuicVersionLabel(last_version_label_);
-  if (destination_connection_id_length != expected_connection_id_length_ &&
-      !should_update_expected_connection_id_length_ &&
+  if (destination_connection_id_length !=
+          expected_server_connection_id_length_ &&
+      !should_update_expected_server_connection_id_length_ &&
       !QuicUtils::VariableLengthConnectionIdAllowedForVersion(
           header.version.transport_version)) {
     SetLastError(QUIC_INVALID_PACKET_HEADER);
     QUIC_DLOG(ERROR) << "Invalid Connection Id Length";
     return;
   }
-  if (should_update_expected_connection_id_length_) {
-    expected_connection_id_length_ = destination_connection_id_length;
+  if (should_update_expected_server_connection_id_length_) {
+    expected_server_connection_id_length_ = destination_connection_id_length;
   }
   // TODO(fayang): Instead of passing in QuicPacketHeader, pass format,
   // version_flag, version and destination_connection_id. Combine
@@ -341,10 +343,10 @@
 QuicConnectionId QuicDispatcher::MaybeReplaceServerConnectionId(
     QuicConnectionId server_connection_id,
     ParsedQuicVersion version) {
-  const uint8_t expected_connection_id_length =
-      no_framer_ ? expected_connection_id_length_
-                 : framer_.GetExpectedConnectionIdLength();
-  if (server_connection_id.length() == expected_connection_id_length) {
+  const uint8_t expected_server_connection_id_length =
+      no_framer_ ? expected_server_connection_id_length_
+                 : framer_.GetExpectedServerConnectionIdLength();
+  if (server_connection_id.length() == expected_server_connection_id_length) {
     return server_connection_id;
   }
   DCHECK(QuicUtils::VariableLengthConnectionIdAllowedForVersion(
@@ -356,7 +358,7 @@
   QuicConnectionId new_connection_id =
       session_helper_->GenerateConnectionIdForReject(version.transport_version,
                                                      server_connection_id);
-  DCHECK_EQ(expected_connection_id_length, new_connection_id.length());
+  DCHECK_EQ(expected_server_connection_id_length, new_connection_id.length());
   connection_id_map_.insert(
       std::make_pair(server_connection_id, new_connection_id));
   QUIC_DLOG(INFO) << "Replacing incoming connection ID " << server_connection_id
@@ -387,18 +389,18 @@
   // connection ID, the dispatcher picks a new one of its expected length.
   // Therefore we should never receive a connection ID that is smaller
   // than 64 bits and smaller than what we expect.
-  const uint8_t expected_connection_id_length =
-      no_framer_ ? expected_connection_id_length_
-                 : framer_.GetExpectedConnectionIdLength();
+  const uint8_t expected_server_connection_id_length =
+      no_framer_ ? expected_server_connection_id_length_
+                 : framer_.GetExpectedServerConnectionIdLength();
   if (server_connection_id.length() < kQuicMinimumInitialConnectionIdLength &&
-      server_connection_id.length() < expected_connection_id_length &&
+      server_connection_id.length() < expected_server_connection_id_length &&
       !allow_short_initial_server_connection_ids_) {
     DCHECK(header.version_flag);
     DCHECK(QuicUtils::VariableLengthConnectionIdAllowedForVersion(
         header.version.transport_version));
     QUIC_DLOG(INFO) << "Packet with short destination connection ID "
                     << server_connection_id << " expected "
-                    << static_cast<int>(expected_connection_id_length);
+                    << static_cast<int>(expected_server_connection_id_length);
     ProcessUnauthenticatedHeaderFate(kFateTimeWait, server_connection_id,
                                      header.form, header.version_flag,
                                      header.version);
diff --git a/quic/core/quic_dispatcher.h b/quic/core/quic_dispatcher.h
index f22505a..790d4d2 100644
--- a/quic/core/quic_dispatcher.h
+++ b/quic/core/quic_dispatcher.h
@@ -48,7 +48,7 @@
                  std::unique_ptr<QuicConnectionHelperInterface> helper,
                  std::unique_ptr<QuicCryptoServerStream::Helper> session_helper,
                  std::unique_ptr<QuicAlarmFactory> alarm_factory,
-                 uint8_t expected_connection_id_length);
+                 uint8_t expected_server_connection_id_length);
   QuicDispatcher(const QuicDispatcher&) = delete;
   QuicDispatcher& operator=(const QuicDispatcher&) = delete;
 
@@ -356,15 +356,15 @@
 
   // If true, our framer will change its expected connection ID length
   // to the received destination connection ID length of all IETF long headers.
-  void SetShouldUpdateExpectedConnectionIdLength(
-      bool should_update_expected_connection_id_length) {
+  void SetShouldUpdateExpectedServerConnectionIdLength(
+      bool should_update_expected_server_connection_id_length) {
     if (!no_framer_) {
-      framer_.SetShouldUpdateExpectedConnectionIdLength(
-          should_update_expected_connection_id_length);
+      framer_.SetShouldUpdateExpectedServerConnectionIdLength(
+          should_update_expected_server_connection_id_length);
       return;
     }
-    should_update_expected_connection_id_length_ =
-        should_update_expected_connection_id_length;
+    should_update_expected_server_connection_id_length_ =
+        should_update_expected_server_connection_id_length;
   }
 
   // If true, the dispatcher will allow incoming initial packets that have
@@ -508,14 +508,15 @@
   // encode its length. This variable contains the length we expect to read.
   // This is also used to signal an error when a long header packet with
   // different destination connection ID length is received when
-  // should_update_expected_connection_id_length_ is false and packet's version
-  // does not allow variable length connection ID. Used when no_framer_ is true.
-  uint8_t expected_connection_id_length_;
+  // should_update_expected_server_connection_id_length_ is false and packet's
+  // version does not allow variable length connection ID. Used when no_framer_
+  // is true.
+  uint8_t expected_server_connection_id_length_;
 
-  // If true, change expected_connection_id_length_ to be the received
+  // If true, change expected_server_connection_id_length_ to be the received
   // destination connection ID length of all IETF long headers. Used when
   // no_framer_ is true.
-  bool should_update_expected_connection_id_length_;
+  bool should_update_expected_server_connection_id_length_;
 
   // Latched value of quic_no_framer_object_in_dispatcher.
   const bool no_framer_;
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc
index 6ebdc78..b66b98d 100644
--- a/quic/core/quic_framer.cc
+++ b/quic/core/quic_framer.cc
@@ -459,7 +459,7 @@
 QuicFramer::QuicFramer(const ParsedQuicVersionVector& supported_versions,
                        QuicTime creation_time,
                        Perspective perspective,
-                       uint8_t expected_connection_id_length)
+                       uint8_t expected_server_connection_id_length)
     : visitor_(nullptr),
       error_(QUIC_NO_ERROR),
       last_serialized_server_connection_id_(EmptyQuicConnectionId()),
@@ -478,8 +478,9 @@
       data_producer_(nullptr),
       infer_packet_header_type_from_version_(perspective ==
                                              Perspective::IS_CLIENT),
-      expected_connection_id_length_(expected_connection_id_length),
-      should_update_expected_connection_id_length_(false),
+      expected_server_connection_id_length_(
+          expected_server_connection_id_length),
+      should_update_expected_server_connection_id_length_(false),
       supports_multiple_packet_number_spaces_(false),
       last_written_packet_number_length_(0) {
   DCHECK(!supported_versions.empty());
@@ -1387,14 +1388,14 @@
 
 // static
 std::unique_ptr<QuicEncryptedPacket> QuicFramer::BuildVersionNegotiationPacket(
-    QuicConnectionId connection_id,
+    QuicConnectionId server_connection_id,
     bool ietf_quic,
     const ParsedQuicVersionVector& versions) {
   if (ietf_quic) {
-    return BuildIetfVersionNegotiationPacket(connection_id, versions);
+    return BuildIetfVersionNegotiationPacket(server_connection_id, versions);
   }
   DCHECK(!versions.empty());
-  size_t len = kPublicFlagsSize + connection_id.length() +
+  size_t len = kPublicFlagsSize + server_connection_id.length() +
                versions.size() * kQuicVersionSize;
   std::unique_ptr<char[]> buffer(new char[len]);
   // Endianness is not a concern here, version negotiation packet does not have
@@ -1409,7 +1410,7 @@
     return nullptr;
   }
 
-  if (!writer.WriteConnectionId(connection_id)) {
+  if (!writer.WriteConnectionId(server_connection_id)) {
     return nullptr;
   }
 
@@ -2614,8 +2615,8 @@
 bool QuicFramer::ProcessAndValidateIetfConnectionIdLength(
     QuicDataReader* reader,
     ParsedQuicVersion version,
-    bool should_update_expected_connection_id_length,
-    uint8_t* expected_connection_id_length,
+    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) {
@@ -2629,18 +2630,18 @@
   if (dcil != 0) {
     dcil += kConnectionIdLengthAdjustment;
   }
-  if (should_update_expected_connection_id_length &&
-      *expected_connection_id_length != dcil) {
-    QUIC_DVLOG(1) << "Updating expected_connection_id_length: "
-                  << static_cast<int>(*expected_connection_id_length) << " -> "
-                  << static_cast<int>(dcil);
-    *expected_connection_id_length = dcil;
+  if (should_update_expected_server_connection_id_length &&
+      *expected_server_connection_id_length != dcil) {
+    QUIC_DVLOG(1) << "Updating expected_server_connection_id_length: "
+                  << static_cast<int>(*expected_server_connection_id_length)
+                  << " -> " << static_cast<int>(dcil);
+    *expected_server_connection_id_length = dcil;
   }
   uint8_t scil = connection_id_lengths_byte & kSourceConnectionIdLengthMask;
   if (scil != 0) {
     scil += kConnectionIdLengthAdjustment;
   }
-  if (!should_update_expected_connection_id_length &&
+  if (!should_update_expected_server_connection_id_length &&
       (dcil != *destination_connection_id_length ||
        scil != *source_connection_id_length) &&
       !QuicUtils::VariableLengthConnectionIdAllowedForVersion(
@@ -2665,18 +2666,19 @@
 
   uint8_t destination_connection_id_length =
       header->destination_connection_id_included == CONNECTION_ID_PRESENT
-          ? expected_connection_id_length_
+          ? expected_server_connection_id_length_
           : 0;
   uint8_t source_connection_id_length =
       header->source_connection_id_included == CONNECTION_ID_PRESENT
-          ? expected_connection_id_length_
+          ? expected_server_connection_id_length_
           : 0;
   if (header->form == IETF_QUIC_LONG_HEADER_PACKET) {
     if (!ProcessAndValidateIetfConnectionIdLength(
             reader, header->version,
-            should_update_expected_connection_id_length_,
-            &expected_connection_id_length_, &destination_connection_id_length,
-            &source_connection_id_length, &detailed_error_)) {
+            should_update_expected_server_connection_id_length_,
+            &expected_server_connection_id_length_,
+            &destination_connection_id_length, &source_connection_id_length,
+            &detailed_error_)) {
       return false;
     }
   }
@@ -6082,14 +6084,14 @@
       *detailed_error = "Unable to read protocol version.";
       return QUIC_INVALID_PACKET_HEADER;
     }
-    // Set should_update_expected_connection_id_length to true to bypass
+    // Set should_update_expected_server_connection_id_length to true to bypass
     // connection ID lengths validation.
     uint8_t unused_source_connection_id_length = 0;
-    uint8_t unused_expected_connection_id_length = 0;
+    uint8_t unused_expected_server_connection_id_length = 0;
     if (!ProcessAndValidateIetfConnectionIdLength(
             &reader, ParseQuicVersionLabel(*version_label),
-            /*should_update_expected_connection_id_length=*/true,
-            &unused_expected_connection_id_length,
+            /*should_update_expected_server_connection_id_length=*/true,
+            &unused_expected_server_connection_id_length,
             destination_connection_id_length,
             &unused_source_connection_id_length, detailed_error)) {
       return QUIC_INVALID_PACKET_HEADER;
@@ -6233,13 +6235,14 @@
     *detailed_error = "Packet is not a version negotiation packet";
     return false;
   }
-  uint8_t expected_connection_id_length = 0,
+  uint8_t expected_server_connection_id_length = 0,
           destination_connection_id_length = 0, source_connection_id_length = 0;
   if (!ProcessAndValidateIetfConnectionIdLength(
           &reader, UnsupportedQuicVersion(),
-          /*should_update_expected_connection_id_length=*/true,
-          &expected_connection_id_length, &destination_connection_id_length,
-          &source_connection_id_length, detailed_error)) {
+          /*should_update_expected_server_connection_id_length=*/true,
+          &expected_server_connection_id_length,
+          &destination_connection_id_length, &source_connection_id_length,
+          detailed_error)) {
     return false;
   }
   if (destination_connection_id_length != 0) {
diff --git a/quic/core/quic_framer.h b/quic/core/quic_framer.h
index e56aba2..d939175 100644
--- a/quic/core/quic_framer.h
+++ b/quic/core/quic_framer.h
@@ -226,7 +226,7 @@
   QuicFramer(const ParsedQuicVersionVector& supported_versions,
              QuicTime creation_time,
              Perspective perspective,
-             uint8_t expected_connection_id_length);
+             uint8_t expected_server_connection_id_length);
   QuicFramer(const QuicFramer&) = delete;
   QuicFramer& operator=(const QuicFramer&) = delete;
 
@@ -575,15 +575,16 @@
 
   // If true, QuicFramer will change its expected connection ID length
   // to the received destination connection ID length of all IETF long headers.
-  void SetShouldUpdateExpectedConnectionIdLength(
-      bool should_update_expected_connection_id_length) {
-    should_update_expected_connection_id_length_ =
-        should_update_expected_connection_id_length;
+  void SetShouldUpdateExpectedServerConnectionIdLength(
+      bool should_update_expected_server_connection_id_length) {
+    should_update_expected_server_connection_id_length_ =
+        should_update_expected_server_connection_id_length;
   }
 
-  // The connection ID length the framer expects on incoming IETF short headers.
-  uint8_t GetExpectedConnectionIdLength() {
-    return expected_connection_id_length_;
+  // The connection ID length the framer expects on incoming IETF short headers
+  // on the server.
+  uint8_t GetExpectedServerConnectionIdLength() {
+    return expected_server_connection_id_length_;
   }
 
   void EnableMultiplePacketNumberSpacesSupport();
@@ -715,8 +716,8 @@
   static bool ProcessAndValidateIetfConnectionIdLength(
       QuicDataReader* reader,
       ParsedQuicVersion version,
-      bool should_update_expected_connection_id_length,
-      uint8_t* expected_connection_id_length,
+      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);
@@ -1017,15 +1018,14 @@
   // encode its length. This variable contains the length we expect to read.
   // This is also used to validate the long header connection ID lengths in
   // older versions of QUIC.
-  // TODO(fayang): Remove this when deprecating
-  // quic_no_framer_object_in_dispatcher.
-  uint8_t expected_connection_id_length_;
+  uint8_t expected_server_connection_id_length_;
 
-  // When this is true, QuicFramer will change expected_connection_id_length_
-  // to the received destination connection ID length of all IETF long headers.
+  // When this is true, QuicFramer will change
+  // expected_server_connection_id_length_ to the received destination
+  // connection ID length of all IETF long headers.
   // TODO(fayang): Remove this when deprecating
   // quic_no_framer_object_in_dispatcher.
-  bool should_update_expected_connection_id_length_;
+  bool should_update_expected_server_connection_id_length_;
 
   // Indicates whether this framer supports multiple packet number spaces.
   bool supports_multiple_packet_number_spaces_;
diff --git a/quic/core/quic_framer_test.cc b/quic/core/quic_framer_test.cc
index 65022e2..0201c8e 100644
--- a/quic/core/quic_framer_test.cc
+++ b/quic/core/quic_framer_test.cc
@@ -13236,8 +13236,8 @@
   QuicConnectionId connection_id(connection_id_bytes,
                                  sizeof(connection_id_bytes));
   QuicFramerPeer::SetLargestPacketNumber(&framer_, kPacketNumber - 2);
-  QuicFramerPeer::SetExpectedConnectionIDLength(&framer_,
-                                                connection_id.length());
+  QuicFramerPeer::SetExpectedServerConnectionIDLength(&framer_,
+                                                      connection_id.length());
 
   // clang-format off
   PacketFragments packet = {
@@ -13293,7 +13293,7 @@
     return;
   }
   SetDecrypterLevel(ENCRYPTION_ZERO_RTT);
-  framer_.SetShouldUpdateExpectedConnectionIdLength(true);
+  framer_.SetShouldUpdateExpectedServerConnectionIdLength(true);
 
   // clang-format off
   unsigned char long_header_packet[] = {
@@ -13405,7 +13405,7 @@
   if (framer_.transport_version() < QUIC_VERSION_46) {
     return;
   }
-  framer_.SetShouldUpdateExpectedConnectionIdLength(true);
+  framer_.SetShouldUpdateExpectedServerConnectionIdLength(true);
   framer_.EnableMultiplePacketNumberSpacesSupport();
 
   // clang-format off
diff --git a/quic/core/quic_packet_creator.h b/quic/core/quic_packet_creator.h
index c9e31ac..a7b1d5c 100644
--- a/quic/core/quic_packet_creator.h
+++ b/quic/core/quic_packet_creator.h
@@ -225,7 +225,7 @@
   void SetServerConnectionIdIncluded(
       QuicConnectionIdIncluded server_connection_id_included);
 
-  // Update the connection ID used in outgoing packets.
+  // Update the server connection ID used in outgoing packets.
   void SetServerConnectionId(QuicConnectionId server_connection_id);
 
   // Sets the encryption level that will be applied to new packets.