Make QuicChromiumClientSession::CloseSessionOnError() take ConnectionCloseBehavior parameter.
Currently when CloseSessionOnError() is called, it always does SILENT_CLOSE when closing the connection. However, sometimes this method is called to abort an active session, which means a connection close packet should be sent. Thus we should refactor this method to take a behavior paramater so the caller can decide which connection close behavior is proper in its own situation.
Change-Id: I2601f4ed6fbd48d9ce89dad6f7a1f6b6fc4eddbd
Reviewed-on: https://chromium-review.googlesource.com/1227399
Reviewed-by: Ryan Hamilton <[email protected]>
Commit-Queue: Renjie Tang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#592670}
diff --git a/net/quic/quic_chromium_client_session_test.cc b/net/quic/quic_chromium_client_session_test.cc
index 93b2b8b..4c46ee0 100644
--- a/net/quic/quic_chromium_client_session_test.cc
+++ b/net/quic/quic_chromium_client_session_test.cc
@@ -180,7 +180,9 @@
void TearDown() override {
if (session_)
- session_->CloseSessionOnError(ERR_ABORTED, quic::QUIC_INTERNAL_ERROR);
+ session_->CloseSessionOnError(
+ ERR_ABORTED, quic::QUIC_INTERNAL_ERROR,
+ quic::ConnectionCloseBehavior::SILENT_CLOSE);
}
void CompleteCryptoHandshake() {