Add a kAFFE client option to enable the usage of AckFrequencyFrame, including
(1) Send min_ack_delay from client.
(2) Update client upon receiving AckFrequencyFrame.

Separate options will enable actual sending of AckFrequencyFrame and is in follow-up CLs.

PiperOrigin-RevId: 332049097
Change-Id: Ibc267ab580ce7ed5638fd2ad62226f67c1604a85
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index da9a925..e3c389b 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -122,6 +122,12 @@
   connection_->SetSessionNotifier(this);
   connection_->SetDataProducer(this);
   connection_->SetFromConfig(config_);
+  if (perspective_ == Perspective::IS_CLIENT &&
+      config_.HasClientRequestedIndependentOption(kAFFE, perspective_) &&
+      version().HasIetfQuicFrames()) {
+    connection_->set_can_receive_ack_frequency_frame();
+    config_.SetMinAckDelayMs(kDefaultMinAckDelayTimeMs);
+  }
   if (perspective() == Perspective::IS_CLIENT && version().UsesTls() &&
       !version().HasHandshakeDone()) {
     config_.SetSupportHandshakeDone();