Cleanup unused code in QuicStream.

gfe-relnote: unused code. Not protected.
PiperOrigin-RevId: 279112591
Change-Id: Iff0606671902211f8db67b4fd1e9fe668651e8d8
diff --git a/quic/core/http/end_to_end_test.cc b/quic/core/http/end_to_end_test.cc
index 2507c7a..33c0452 100644
--- a/quic/core/http/end_to_end_test.cc
+++ b/quic/core/http/end_to_end_test.cc
@@ -4059,7 +4059,8 @@
   ASSERT_NE(nullptr, client_stream);
   // Make sure we have the correct stream
   EXPECT_EQ(stream_id, client_stream->id());
-  EXPECT_EQ(kStopSendingTestCode, client_stream->last_stop_sending_code());
+  EXPECT_EQ(kStopSendingTestCode,
+            static_cast<uint16_t>(client_stream->stream_error()));
 }
 
 TEST_P(EndToEndTest, SimpleStopSendingRstStreamTest) {
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index 2761e61..779476e 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -263,8 +263,6 @@
     return;
   }
 
-  stream->OnStopSending(frame.application_error_code);
-
   stream->set_stream_error(
       static_cast<QuicRstStreamErrorCode>(frame.application_error_code));
   SendRstStreamInner(
diff --git a/quic/core/quic_session_test.cc b/quic/core/quic_session_test.cc
index c148961..d5d8321 100644
--- a/quic/core/quic_session_test.cc
+++ b/quic/core/quic_session_test.cc
@@ -143,7 +143,6 @@
                bool(QuicStreamOffset, QuicByteCount, bool));
 
   MOCK_CONST_METHOD0(HasPendingRetransmission, bool());
-  MOCK_METHOD1(OnStopSending, void(uint16_t code));
 };
 
 class TestSession : public QuicSession {
@@ -2698,7 +2697,6 @@
 
   QuicStreamId stream_id = stream->id();
   QuicStopSendingFrame frame(1, stream_id, 123);
-  EXPECT_CALL(*stream, OnStopSending(123));
   // Expect a reset to come back out.
   EXPECT_CALL(*connection_, SendControlFrame(_));
   EXPECT_CALL(
@@ -2706,8 +2704,7 @@
       OnStreamReset(stream_id, static_cast<QuicRstStreamErrorCode>(123)));
   EXPECT_CALL(*connection_, CloseConnection(_, _, _)).Times(0);
   session_.OnStopSendingFrame(frame);
-  // When the STOP_SENDING is received, the node generates a RST_STREAM,
-  // which closes the stream in the write direction. Ensure this.
+
   EXPECT_FALSE(QuicStreamPeer::read_side_closed(stream));
   EXPECT_TRUE(stream->write_side_closed());
 }
diff --git a/quic/core/quic_stream.cc b/quic/core/quic_stream.cc
index e2a57dd..30c94f9 100644
--- a/quic/core/quic_stream.cc
+++ b/quic/core/quic_stream.cc
@@ -374,7 +374,6 @@
     set_fin_sent(true);
     CloseWriteSide();
   }
-  SetFromConfig();
   if (type_ != CRYPTO) {
     session_->RegisterStreamPriority(id, is_static_, precedence_);
   }
@@ -393,8 +392,6 @@
   }
 }
 
-void QuicStream::SetFromConfig() {}
-
 void QuicStream::OnStreamFrame(const QuicStreamFrame& frame) {
   DCHECK_EQ(frame.stream_id, id_);
 
@@ -1199,6 +1196,4 @@
   session_->SendStopSending(code, id_);
 }
 
-void QuicStream::OnStopSending(uint16_t /*code*/) {}
-
 }  // namespace quic
diff --git a/quic/core/quic_stream.h b/quic/core/quic_stream.h
index de0cc65..ef8a6c1 100644
--- a/quic/core/quic_stream.h
+++ b/quic/core/quic_stream.h
@@ -136,9 +136,6 @@
 
   virtual ~QuicStream();
 
-  // Not in use currently.
-  void SetFromConfig();
-
   // QuicStreamSequencer::StreamInterface implementation.
   QuicStreamId id() const override { return id_; }
   // Called by the stream subclass after it has consumed the final incoming
@@ -339,12 +336,6 @@
   // this method or not.
   void SendStopSending(uint16_t code);
 
-  // Invoked when QUIC receives a STOP_SENDING frame for this stream, informing
-  // the application that the peer has sent a STOP_SENDING. The default
-  // implementation is a noop. Is to be overridden by the application-specific
-  // QuicStream class.
-  virtual void OnStopSending(uint16_t code);
-
   // Close the write side of the socket.  Further writes will fail.
   // Can be called by the subclass or internally.
   // Does not send a FIN.  May cause the stream to be closed.