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/reliable_quic_stream.h" | 5 #include "net/quic/reliable_quic_stream.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/quic/quic_session.h" | 8 #include "net/quic/quic_session.h" |
9 #include "net/quic/quic_spdy_decompressor.h" | 9 #include "net/quic/quic_spdy_decompressor.h" |
10 #include "net/quic/quic_write_blocked_list.h" | 10 #include "net/quic/quic_write_blocked_list.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 return true; | 65 return true; |
66 } | 66 } |
67 // Note: This count include duplicate data received. | 67 // Note: This count include duplicate data received. |
68 stream_bytes_read_ += frame.data.TotalBufferSize(); | 68 stream_bytes_read_ += frame.data.TotalBufferSize(); |
69 | 69 |
70 bool accepted = sequencer_.OnStreamFrame(frame); | 70 bool accepted = sequencer_.OnStreamFrame(frame); |
71 | 71 |
72 return accepted; | 72 return accepted; |
73 } | 73 } |
74 | 74 |
75 void ReliableQuicStream::OnStreamReset(QuicRstStreamErrorCode error) { | 75 void ReliableQuicStream::OnStreamReset(const QuicRstStreamFrame& frame) { |
76 stream_error_ = error; | 76 stream_error_ = frame.error_code; |
77 CloseWriteSide(); | 77 CloseWriteSide(); |
78 CloseReadSide(); | 78 CloseReadSide(); |
79 } | 79 } |
80 | 80 |
81 void ReliableQuicStream::OnConnectionClosed(QuicErrorCode error, | 81 void ReliableQuicStream::OnConnectionClosed(QuicErrorCode error, |
82 bool from_peer) { | 82 bool from_peer) { |
83 if (read_side_closed_ && write_side_closed_) { | 83 if (read_side_closed_ && write_side_closed_) { |
84 return; | 84 return; |
85 } | 85 } |
86 if (error != QUIC_NO_ERROR) { | 86 if (error != QUIC_NO_ERROR) { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 bool ReliableQuicStream::HasBufferedData() { | 224 bool ReliableQuicStream::HasBufferedData() { |
225 return !queued_data_.empty(); | 225 return !queued_data_.empty(); |
226 } | 226 } |
227 | 227 |
228 void ReliableQuicStream::OnClose() { | 228 void ReliableQuicStream::OnClose() { |
229 CloseReadSide(); | 229 CloseReadSide(); |
230 CloseWriteSide(); | 230 CloseWriteSide(); |
231 } | 231 } |
232 | 232 |
233 } // namespace net | 233 } // namespace net |
OLD | NEW |