Pass reject reasons explicitly to BuildRejection

This is a no-op change to support subsequent Leto CLs.  BuildRejection will soon be called from another location in a situation where context.info().reject_reasons is not set.

gfe-relnote: No-op refactoring, not flag-protected.
PiperOrigin-RevId: 239244511
Change-Id: Ic4cf0207b40f702290988489075f56673e8bc688
diff --git a/quic/core/crypto/quic_crypto_server_config.cc b/quic/core/crypto/quic_crypto_server_config.cc
index 50a6a36..426e8da 100644
--- a/quic/core/crypto/quic_crypto_server_config.cc
+++ b/quic/core/crypto/quic_crypto_server_config.cc
@@ -759,7 +759,8 @@
 
   auto out = QuicMakeUnique<CryptoHandshakeMessage>();
   if (!context->info().reject_reasons.empty() || !requested_config) {
-    BuildRejection(*context, *primary_config, out.get());
+    BuildRejection(*context, *primary_config, context->info().reject_reasons,
+                   out.get());
     if (rejection_observer_ != nullptr) {
       rejection_observer_->OnRejectionBuilt(context->info().reject_reasons,
                                             out.get());
@@ -1355,6 +1356,7 @@
 void QuicCryptoServerConfig::BuildRejection(
     const ProcessClientHelloContext& context,
     const Config& config,
+    const std::vector<uint32_t>& reject_reasons,
     CryptoHandshakeMessage* out) const {
   const QuicWallTime now = context.clock()->WallNow();
   if (GetQuicReloadableFlag(enable_quic_stateless_reject_support) &&
@@ -1393,8 +1395,8 @@
   }
 
   // Send client the reject reason for debugging purposes.
-  DCHECK_LT(0u, context.info().reject_reasons.size());
-  out->SetVector(kRREJ, context.info().reject_reasons);
+  DCHECK_LT(0u, reject_reasons.size());
+  out->SetVector(kRREJ, reject_reasons);
 
   // The client may have requested a certificate chain.
   if (!ClientDemandsX509Proof(context.client_hello())) {
diff --git a/quic/core/crypto/quic_crypto_server_config.h b/quic/core/crypto/quic_crypto_server_config.h
index 9216eae..8b020d0 100644
--- a/quic/core/crypto/quic_crypto_server_config.h
+++ b/quic/core/crypto/quic_crypto_server_config.h
@@ -681,6 +681,7 @@
   // BuildRejection sets |out| to be a REJ message in reply to |client_hello|.
   void BuildRejection(const ProcessClientHelloContext& context,
                       const Config& config,
+                      const std::vector<uint32_t>& reject_reasons,
                       CryptoHandshakeMessage* out) const;
 
   // CompressChain compresses the certificates in |chain->certs| and returns a