| Index: net/quic/quic_client_session.cc
|
| diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
|
| index 1fc494d434433249a158365831158e07cafbd4db..fd3c8273f2aaccbb2ebb6464e2fe7dac59ab3b83 100644
|
| --- a/net/quic/quic_client_session.cc
|
| +++ b/net/quic/quic_client_session.cc
|
| @@ -14,6 +14,7 @@ QuicClientSession::QuicClientSession(QuicConnection* connection)
|
| }
|
|
|
| QuicClientSession::~QuicClientSession() {
|
| + STLDeleteValues(&streams_);
|
| }
|
|
|
| QuicReliableClientStream* QuicClientSession::CreateOutgoingReliableStream() {
|
| @@ -28,6 +29,7 @@ QuicReliableClientStream* QuicClientSession::CreateOutgoingReliableStream() {
|
| }
|
| QuicReliableClientStream* stream =
|
| new QuicReliableClientStream(GetNextStreamId(), this);
|
| + streams_[stream->id()] = stream;
|
|
|
| ActivateStream(stream);
|
| return stream;
|
| @@ -56,6 +58,18 @@ ReliableQuicStream* QuicClientSession::CreateIncomingReliableStream(
|
| return NULL;
|
| }
|
|
|
| +void QuicClientSession::CloseStream(QuicStreamId stream_id) {
|
| + QuicSession::CloseStream(stream_id);
|
| +
|
| + StreamMap::iterator it = streams_.find(stream_id);
|
| + DCHECK(it != streams_.end());
|
| + if (it != streams_.end()) {
|
| + ReliableQuicStream* stream = it->second;
|
| + streams_.erase(it);
|
| + delete stream;
|
| + }
|
| +}
|
| +
|
| void QuicClientSession::OnCryptoHandshakeComplete(QuicErrorCode error) {
|
| if (!callback_.is_null()) {
|
| callback_.Run(error == QUIC_NO_ERROR ? OK : ERR_UNEXPECTED);
|
|
|