gfe-relnote: Delete some dead Token Binding code in QUIC. Not flag protected

PiperOrigin-RevId: 247986160
Change-Id: I1d504722b5f2020815084213704a2888172f9fc7
diff --git a/quic/core/crypto/quic_crypto_server_config.cc b/quic/core/crypto/quic_crypto_server_config.cc
index 7cd9761..404a29e 100644
--- a/quic/core/crypto/quic_crypto_server_config.cc
+++ b/quic/core/crypto/quic_crypto_server_config.cc
@@ -341,10 +341,6 @@
     msg.SetVector(kPDMD, QuicTagVector{kCHID});
   }
 
-  if (!options.token_binding_params.empty()) {
-    msg.SetVector(kTBKP, options.token_binding_params);
-  }
-
   if (options.id.empty()) {
     // We need to ensure that the SCID changes whenever the server config does
     // thus we make it a hash of the rest of the server config.
diff --git a/quic/core/crypto/quic_crypto_server_config.h b/quic/core/crypto/quic_crypto_server_config.h
index 7f3f947..9f3a7bc 100644
--- a/quic/core/crypto/quic_crypto_server_config.h
+++ b/quic/core/crypto/quic_crypto_server_config.h
@@ -191,9 +191,6 @@
     // channel_id_enabled controls whether the server config will indicate
     // support for ChannelIDs.
     bool channel_id_enabled;
-    // token_binding_params contains the list of Token Binding params (e.g.
-    // P256, TB10) that the server config will include.
-    QuicTagVector token_binding_params;
     // id contains the server config id for the resulting config. If empty, a
     // random id is generated.
     std::string id;
diff --git a/quic/core/http/quic_spdy_client_session_test.cc b/quic/core/http/quic_spdy_client_session_test.cc
index 2787175..47f3a63 100644
--- a/quic/core/http/quic_spdy_client_session_test.cc
+++ b/quic/core/http/quic_spdy_client_session_test.cc
@@ -152,11 +152,10 @@
     session_->CryptoConnect();
     QuicCryptoClientStream* stream = static_cast<QuicCryptoClientStream*>(
         session_->GetMutableCryptoStream());
-    crypto_test_utils::FakeServerOptions options;
     QuicConfig config = DefaultQuicConfig();
     config.SetMaxIncomingDynamicStreamsToSend(server_max_incoming_streams);
     crypto_test_utils::HandshakeWithFakeServer(
-        &config, &helper_, &alarm_factory_, connection_, stream, options);
+        &config, &helper_, &alarm_factory_, connection_, stream);
   }
 
   QuicCryptoClientConfig crypto_config_;
diff --git a/quic/core/quic_crypto_client_stream_test.cc b/quic/core/quic_crypto_client_stream_test.cc
index 042d973..e09546d 100644
--- a/quic/core/quic_crypto_client_stream_test.cc
+++ b/quic/core/quic_crypto_client_stream_test.cc
@@ -64,9 +64,8 @@
         .Times(testing::AnyNumber());
     stream()->CryptoConnect();
     QuicConfig config;
-    crypto_test_utils::HandshakeWithFakeServer(&config, &server_helper_,
-                                               &alarm_factory_, connection_,
-                                               stream(), server_options_);
+    crypto_test_utils::HandshakeWithFakeServer(
+        &config, &server_helper_, &alarm_factory_, connection_, stream());
   }
 
   QuicCryptoClientStream* stream() {
@@ -82,7 +81,6 @@
   QuicServerId server_id_;
   CryptoHandshakeMessage message_;
   QuicCryptoClientConfig crypto_config_;
-  crypto_test_utils::FakeServerOptions server_options_;
 };
 
 TEST_F(QuicCryptoClientStreamTest, NotInitiallyConected) {
@@ -262,9 +260,8 @@
       QuicCryptoServerConfig::TESTING, QuicRandom::GetInstance(),
       crypto_test_utils::ProofSourceForTesting(), KeyExchangeSource::Default(),
       TlsServerHandshaker::CreateSslCtx());
-  crypto_test_utils::FakeServerOptions options;
   crypto_test_utils::SetupCryptoServerConfigForTest(
-      connection_->clock(), QuicRandom::GetInstance(), &crypto_config, options);
+      connection_->clock(), QuicRandom::GetInstance(), &crypto_config);
   SourceAddressTokens tokens;
   QuicCompressedCertsCache cache(1);
   CachedNetworkParameters network_params;
diff --git a/quic/core/quic_crypto_server_stream_test.cc b/quic/core/quic_crypto_server_stream_test.cc
index 30f954d..b6dfb5e 100644
--- a/quic/core/quic_crypto_server_stream_test.cc
+++ b/quic/core/quic_crypto_server_stream_test.cc
@@ -96,11 +96,9 @@
         .Times(testing::AnyNumber());
     EXPECT_CALL(*server_session_->helper(), GenerateConnectionIdForReject(_, _))
         .Times(testing::AnyNumber());
-    crypto_test_utils::FakeServerOptions options;
-    options.token_binding_params = QuicTagVector{kTB10};
     crypto_test_utils::SetupCryptoServerConfigForTest(
         server_connection_->clock(), server_connection_->random_generator(),
-        &server_crypto_config_, options);
+        &server_crypto_config_);
     server_session_->GetMutableCryptoStream()->OnSuccessfulVersionNegotiation(
         supported_versions_.front());
   }
diff --git a/quic/test_tools/crypto_test_utils.cc b/quic/test_tools/crypto_test_utils.cc
index 0157456..ac7e384 100644
--- a/quic/test_tools/crypto_test_utils.cc
+++ b/quic/test_tools/crypto_test_utils.cc
@@ -89,10 +89,6 @@
 
 }  // anonymous namespace
 
-FakeServerOptions::FakeServerOptions() {}
-
-FakeServerOptions::~FakeServerOptions() {}
-
 FakeClientOptions::FakeClientOptions() {}
 
 FakeClientOptions::~FakeClientOptions() {}
@@ -219,8 +215,7 @@
                             MockQuicConnectionHelper* helper,
                             MockAlarmFactory* alarm_factory,
                             PacketSavingConnection* client_conn,
-                            QuicCryptoClientStream* client,
-                            const FakeServerOptions& options) {
+                            QuicCryptoClientStream* client) {
   PacketSavingConnection* server_conn = new PacketSavingConnection(
       helper, alarm_factory, Perspective::IS_SERVER,
       ParsedVersionOfIndex(client_conn->supported_versions(), 0));
@@ -231,9 +226,8 @@
       TlsServerHandshaker::CreateSslCtx());
   QuicCompressedCertsCache compressed_certs_cache(
       QuicCompressedCertsCache::kQuicCompressedCertsCacheSize);
-  SetupCryptoServerConfigForTest(server_conn->clock(),
-                                 server_conn->random_generator(),
-                                 &crypto_config, options);
+  SetupCryptoServerConfigForTest(
+      server_conn->clock(), server_conn->random_generator(), &crypto_config);
 
   TestQuicSpdyServerSession server_session(
       server_conn, *server_quic_config, client_conn->supported_versions(),
@@ -307,11 +301,9 @@
 
 void SetupCryptoServerConfigForTest(const QuicClock* clock,
                                     QuicRandom* rand,
-                                    QuicCryptoServerConfig* crypto_config,
-                                    const FakeServerOptions& fake_options) {
+                                    QuicCryptoServerConfig* crypto_config) {
   QuicCryptoServerConfig::ConfigOptions options;
   options.channel_id_enabled = true;
-  options.token_binding_params = fake_options.token_binding_params;
   std::unique_ptr<CryptoHandshakeMessage> scfg =
       crypto_config->AddDefaultConfig(rand, clock, options);
 }
diff --git a/quic/test_tools/crypto_test_utils.h b/quic/test_tools/crypto_test_utils.h
index 1091c8c..7397f85 100644
--- a/quic/test_tools/crypto_test_utils.h
+++ b/quic/test_tools/crypto_test_utils.h
@@ -53,16 +53,6 @@
   virtual void RunPendingCallbacks() = 0;
 };
 
-// FakeServerOptions bundles together a number of options for configuring the
-// server in HandshakeWithFakeServer.
-struct FakeServerOptions {
-  FakeServerOptions();
-  ~FakeServerOptions();
-
-  // The Token Binding params that the server supports and will negotiate.
-  QuicTagVector token_binding_params;
-};
-
 // FakeClientOptions bundles together a number of options for configuring
 // HandshakeWithFakeClient.
 struct FakeClientOptions {
@@ -79,8 +69,7 @@
                             MockQuicConnectionHelper* helper,
                             MockAlarmFactory* alarm_factory,
                             PacketSavingConnection* client_conn,
-                            QuicCryptoClientStream* client,
-                            const FakeServerOptions& options);
+                            QuicCryptoClientStream* client);
 
 // returns: the number of client hellos that the client sent.
 int HandshakeWithFakeClient(MockQuicConnectionHelper* helper,
@@ -94,8 +83,7 @@
 // with sensible defaults for testing.
 void SetupCryptoServerConfigForTest(const QuicClock* clock,
                                     QuicRandom* rand,
-                                    QuicCryptoServerConfig* crypto_config,
-                                    const FakeServerOptions& options);
+                                    QuicCryptoServerConfig* crypto_config);
 
 // Sends the handshake message |message| to stream |stream| with the perspective
 // that the message is coming from |perspective|.