Stop allowing QuicReceiveControlStream to construct from session and stream_id.

The stream will be constructed from pending stream no matter the order of
delivery and the current code base is already up to date. Cleaning this up will only affect test code.

gfe-relnote: n/a --code cleanup.
PiperOrigin-RevId: 253130432
Change-Id: Idcdaa693b421e5c0911031dcdc44eb5e8c40d9c5
diff --git a/quic/core/http/quic_receive_control_stream.cc b/quic/core/http/quic_receive_control_stream.cc
index cf7c979..91f65c8 100644
--- a/quic/core/http/quic_receive_control_stream.cc
+++ b/quic/core/http/quic_receive_control_stream.cc
@@ -114,15 +114,6 @@
   QuicReceiveControlStream* stream_;
 };
 
-QuicReceiveControlStream::QuicReceiveControlStream(QuicStreamId id,
-                                                   QuicSpdySession* session)
-    : QuicStream(id, session, /*is_static = */ true, READ_UNIDIRECTIONAL),
-      received_settings_length_(0),
-      http_decoder_visitor_(new HttpDecoderVisitor(this)) {
-  decoder_.set_visitor(http_decoder_visitor_.get());
-  sequencer()->set_level_triggered(true);
-}
-
 QuicReceiveControlStream::QuicReceiveControlStream(PendingStream* pending)
     : QuicStream(pending, READ_UNIDIRECTIONAL, /*is_static=*/true),
       received_settings_length_(0),
diff --git a/quic/core/http/quic_receive_control_stream.h b/quic/core/http/quic_receive_control_stream.h
index ad4e5d8..79964ba 100644
--- a/quic/core/http/quic_receive_control_stream.h
+++ b/quic/core/http/quic_receive_control_stream.h
@@ -17,11 +17,6 @@
 // The receive control stream is peer initiated and is read only.
 class QUIC_EXPORT_PRIVATE QuicReceiveControlStream : public QuicStream {
  public:
-  // |session| can't be nullptr, and the ownership is not passed. The stream can
-  // only be accessed through the session.
-  explicit QuicReceiveControlStream(QuicStreamId id, QuicSpdySession* session);
-  // Construct control stream from pending stream, the |pending| object will no
-  // longer exist after the construction.
   explicit QuicReceiveControlStream(PendingStream* pending);
   QuicReceiveControlStream(const QuicReceiveControlStream&) = delete;
   QuicReceiveControlStream& operator=(const QuicReceiveControlStream&) = delete;
diff --git a/quic/core/http/quic_receive_control_stream_test.cc b/quic/core/http/quic_receive_control_stream_test.cc
index 73827d5..e0acf89 100644
--- a/quic/core/http/quic_receive_control_stream_test.cc
+++ b/quic/core/http/quic_receive_control_stream_test.cc
@@ -54,12 +54,14 @@
             SupportedVersions(GetParam().version))),
         session_(connection_) {
     session_.Initialize();
-    receive_control_stream_ = QuicMakeUnique<QuicReceiveControlStream>(
+    auto pending = QuicMakeUnique<PendingStream>(
         QuicUtils::GetFirstUnidirectionalStreamId(
             GetParam().version.transport_version,
             perspective() == Perspective::IS_CLIENT ? Perspective::IS_SERVER
                                                     : Perspective::IS_CLIENT),
         &session_);
+    receive_control_stream_ =
+        QuicMakeUnique<QuicReceiveControlStream>(pending.get());
   }
 
   Perspective perspective() const { return GetParam().perspective; }