Chromium Code Reviews| 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..9fc4904fb10a705702843c5ed9d3eb93d9df03b2 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,19 @@ 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; |
| + //closed_streams_.push_back(it->second); |
|
willchan no longer on Chromium
2012/11/21 22:50:03
?
Ryan Hamilton
2012/11/21 23:06:35
Removed.
|
| + streams_.erase(it); |
| + delete stream; |
| + } |
| +} |
| + |
| void QuicClientSession::OnCryptoHandshakeComplete(QuicErrorCode error) { |
| if (!callback_.is_null()) { |
| callback_.Run(error == QUIC_NO_ERROR ? OK : ERR_UNEXPECTED); |