| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/quic/quic_client_session_base.h" | 5 #include "net/quic/quic_client_session_base.h" |
| 6 | 6 |
| 7 #include "net/quic/quic_client_promised_info.h" | 7 #include "net/quic/quic_client_promised_info.h" |
| 8 #include "net/quic/quic_flags.h" | 8 #include "net/quic/quic_flags.h" |
| 9 #include "net/quic/spdy_utils.h" | 9 #include "net/quic/spdy_utils.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 largest_promised_stream_id_(kInvalidStreamId) {} | 22 largest_promised_stream_id_(kInvalidStreamId) {} |
| 23 | 23 |
| 24 QuicClientSessionBase::~QuicClientSessionBase() { | 24 QuicClientSessionBase::~QuicClientSessionBase() { |
| 25 // all promised streams for this session | 25 // all promised streams for this session |
| 26 for (auto& it : promised_by_id_) { | 26 for (auto& it : promised_by_id_) { |
| 27 DVLOG(1) << "erase stream " << it.first << " url " << it.second->url(); | 27 DVLOG(1) << "erase stream " << it.first << " url " << it.second->url(); |
| 28 push_promise_index_->promised_by_url()->erase(it.second->url()); | 28 push_promise_index_->promised_by_url()->erase(it.second->url()); |
| 29 } | 29 } |
| 30 } | 30 } |
| 31 | 31 |
| 32 void QuicClientSessionBase::OnConfigNegotiated() { |
| 33 QuicSpdySession::OnConfigNegotiated(); |
| 34 } |
| 35 |
| 32 void QuicClientSessionBase::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { | 36 void QuicClientSessionBase::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { |
| 33 QuicSession::OnCryptoHandshakeEvent(event); | 37 QuicSession::OnCryptoHandshakeEvent(event); |
| 34 } | 38 } |
| 35 | 39 |
| 36 void QuicClientSessionBase::OnPromiseHeaders(QuicStreamId stream_id, | 40 void QuicClientSessionBase::OnPromiseHeaders(QuicStreamId stream_id, |
| 37 StringPiece headers_data) { | 41 StringPiece headers_data) { |
| 38 QuicSpdyStream* stream = GetSpdyDataStream(stream_id); | 42 QuicSpdyStream* stream = GetSpdyDataStream(stream_id); |
| 39 if (!stream) { | 43 if (!stream) { |
| 40 // It's quite possible to receive headers after a stream has been reset. | 44 // It's quite possible to receive headers after a stream has been reset. |
| 41 return; | 45 return; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 void QuicClientSessionBase::ResetPromised(QuicStreamId id, | 196 void QuicClientSessionBase::ResetPromised(QuicStreamId id, |
| 193 QuicRstStreamErrorCode error_code) { | 197 QuicRstStreamErrorCode error_code) { |
| 194 SendRstStream(id, error_code, 0); | 198 SendRstStream(id, error_code, 0); |
| 195 if (!IsOpenStream(id)) { | 199 if (!IsOpenStream(id)) { |
| 196 MaybeIncreaseLargestPeerStreamId(id); | 200 MaybeIncreaseLargestPeerStreamId(id); |
| 197 InsertLocallyClosedStreamsHighestOffset(id, 0); | 201 InsertLocallyClosedStreamsHighestOffset(id, 0); |
| 198 } | 202 } |
| 199 } | 203 } |
| 200 | 204 |
| 201 } // namespace net | 205 } // namespace net |
| OLD | NEW |