OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_session.h" | 5 #include "net/quic/quic_session.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "net/quic/crypto/proof_verifier.h" | 8 #include "net/quic/crypto/proof_verifier.h" |
9 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
10 #include "net/quic/quic_headers_stream.h" | 10 #include "net/quic/quic_headers_stream.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 DCHECK(!stream->headers_decompressed()); | 234 DCHECK(!stream->headers_decompressed()); |
235 AddPrematurelyClosedStream(frame.stream_id); | 235 AddPrematurelyClosedStream(frame.stream_id); |
236 return; | 236 return; |
237 } | 237 } |
238 if (connection()->version() <= QUIC_VERSION_12) { | 238 if (connection()->version() <= QUIC_VERSION_12) { |
239 if (stream->stream_bytes_read() > 0 && !stream->headers_decompressed()) { | 239 if (stream->stream_bytes_read() > 0 && !stream->headers_decompressed()) { |
240 connection()->SendConnectionClose( | 240 connection()->SendConnectionClose( |
241 QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED); | 241 QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED); |
242 } | 242 } |
243 } | 243 } |
244 stream->OnStreamReset(frame.error_code); | 244 stream->OnStreamReset(frame); |
245 } | 245 } |
246 | 246 |
247 void QuicSession::OnGoAway(const QuicGoAwayFrame& frame) { | 247 void QuicSession::OnGoAway(const QuicGoAwayFrame& frame) { |
248 DCHECK(frame.last_good_stream_id < next_stream_id_); | 248 DCHECK(frame.last_good_stream_id < next_stream_id_); |
249 goaway_received_ = true; | 249 goaway_received_ = true; |
250 } | 250 } |
251 | 251 |
252 void QuicSession::OnConnectionClosed(QuicErrorCode error, bool from_peer) { | 252 void QuicSession::OnConnectionClosed(QuicErrorCode error, bool from_peer) { |
253 DCHECK(!connection_->connected()); | 253 DCHECK(!connection_->connected()); |
254 if (error_ == QUIC_NO_ERROR) { | 254 if (error_ == QUIC_NO_ERROR) { |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 NOTIMPLEMENTED(); | 628 NOTIMPLEMENTED(); |
629 return false; | 629 return false; |
630 } | 630 } |
631 | 631 |
632 void QuicSession::PostProcessAfterData() { | 632 void QuicSession::PostProcessAfterData() { |
633 STLDeleteElements(&closed_streams_); | 633 STLDeleteElements(&closed_streams_); |
634 closed_streams_.clear(); | 634 closed_streams_.clear(); |
635 } | 635 } |
636 | 636 |
637 } // namespace net | 637 } // namespace net |
OLD | NEW |