Move incoming SETTINGS handling from QuicReceiveControlStream to QuicSpdySession.

In the future, QuicSpdySession::OnSettingsFrame needs to do more work such as storing them into the session cache.

gfe-relnote: no behavior change. not protected.
PiperOrigin-RevId: 305886563
Change-Id: I68115e4a21d7c08b20d1163ea24744f8224c686a
diff --git a/quic/core/http/quic_receive_control_stream.cc b/quic/core/http/quic_receive_control_stream.cc
index 17c6ecc..7b54756 100644
--- a/quic/core/http/quic_receive_control_stream.cc
+++ b/quic/core/http/quic_receive_control_stream.cc
@@ -134,12 +134,7 @@
 bool QuicReceiveControlStream::OnSettingsFrame(const SettingsFrame& frame) {
   QUIC_DVLOG(1) << "Control Stream " << id()
                 << " received settings frame: " << frame;
-  if (spdy_session_->debug_visitor() != nullptr) {
-    spdy_session_->debug_visitor()->OnSettingsFrameReceived(frame);
-  }
-  for (const auto& setting : frame.values) {
-    spdy_session_->OnSetting(setting.first, setting.second);
-  }
+  spdy_session_->OnSettingsFrame(frame);
   return true;
 }
 
diff --git a/quic/core/http/quic_spdy_session.cc b/quic/core/http/quic_spdy_session.cc
index acef1b6..c7bb953 100644
--- a/quic/core/http/quic_spdy_session.cc
+++ b/quic/core/http/quic_spdy_session.cc
@@ -872,6 +872,15 @@
                                 ConnectionCloseBehavior::SILENT_CLOSE);
 }
 
+void QuicSpdySession::OnSettingsFrame(const SettingsFrame& frame) {
+  if (debug_visitor_ != nullptr) {
+    debug_visitor_->OnSettingsFrameReceived(frame);
+  }
+  for (const auto& setting : frame.values) {
+    OnSetting(setting.first, setting.second);
+  }
+}
+
 void QuicSpdySession::OnSetting(uint64_t id, uint64_t value) {
   if (VersionUsesHttp3(transport_version())) {
     // SETTINGS frame received on the control stream.
diff --git a/quic/core/http/quic_spdy_session.h b/quic/core/http/quic_spdy_session.h
index cf732fa..29eca32 100644
--- a/quic/core/http/quic_spdy_session.h
+++ b/quic/core/http/quic_spdy_session.h
@@ -246,6 +246,9 @@
   // client.
   bool server_push_enabled() const;
 
+  // Called when the control stream receives HTTP/3 SETTINGS.
+  void OnSettingsFrame(const SettingsFrame& frame);
+
   // Called when a setting is parsed from an incoming SETTINGS frame.
   void OnSetting(uint64_t id, uint64_t value);