Make QuicSession::ResetStream() smarter.
If the stream reseted doesn't exist, we always send out 0 as the bytes written. And if it doesn, we always send what the stream has written. So we don't need the explicit parameter for bytes_written.
No behavior change. not protected.
PiperOrigin-RevId: 319211675
Change-Id: I6c96d94e2d0ec1eca0c86a4740a7384aa15c8529
diff --git a/quic/core/quic_stream_test.cc b/quic/core/quic_stream_test.cc
index a991a52..da709d4 100644
--- a/quic/core/quic_stream_test.cc
+++ b/quic/core/quic_stream_test.cc
@@ -130,7 +130,7 @@
StreamSendingState /*state*/,
TransmissionType /*type*/,
quiche::QuicheOptional<EncryptionLevel> /*level*/) {
- session_->ResetStream(id, QUIC_STREAM_CANCELLED, 0);
+ session_->ResetStream(id, QUIC_STREAM_CANCELLED);
return QuicConsumedData(1, false);
}