OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_data_stream.h" | 5 #include "net/quic/quic_data_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_utils.h" | 9 #include "net/quic/quic_utils.h" |
10 #include "net/quic/quic_write_blocked_list.h" | 10 #include "net/quic/quic_write_blocked_list.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 } | 41 } |
42 | 42 |
43 QuicDataStream::~QuicDataStream() { | 43 QuicDataStream::~QuicDataStream() { |
44 } | 44 } |
45 | 45 |
46 size_t QuicDataStream::WriteHeaders( | 46 size_t QuicDataStream::WriteHeaders( |
47 const SpdyHeaderBlock& header_block, | 47 const SpdyHeaderBlock& header_block, |
48 bool fin, | 48 bool fin, |
49 QuicAckNotifier::DelegateInterface* ack_notifier_delegate) { | 49 QuicAckNotifier::DelegateInterface* ack_notifier_delegate) { |
50 size_t bytes_written = session()->WriteHeaders( | 50 size_t bytes_written = session()->WriteHeaders( |
51 id(), header_block, fin, ack_notifier_delegate); | 51 id(), header_block, fin, priority_, ack_notifier_delegate); |
52 if (fin) { | 52 if (fin) { |
53 // TODO(rch): Add test to ensure fin_sent_ is set whenever a fin is sent. | 53 // TODO(rch): Add test to ensure fin_sent_ is set whenever a fin is sent. |
54 set_fin_sent(true); | 54 set_fin_sent(true); |
55 CloseWriteSide(); | 55 CloseWriteSide(); |
56 } | 56 } |
57 return bytes_written; | 57 return bytes_written; |
58 } | 58 } |
59 | 59 |
60 size_t QuicDataStream::Readv(const struct iovec* iov, size_t iov_len) { | 60 size_t QuicDataStream::Readv(const struct iovec* iov, size_t iov_len) { |
61 if (FinishedReadingHeaders()) { | 61 if (FinishedReadingHeaders()) { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 visitor_ = nullptr; | 178 visitor_ = nullptr; |
179 visitor->OnClose(this); | 179 visitor->OnClose(this); |
180 } | 180 } |
181 } | 181 } |
182 | 182 |
183 bool QuicDataStream::FinishedReadingHeaders() { | 183 bool QuicDataStream::FinishedReadingHeaders() { |
184 return headers_decompressed_ && decompressed_headers_.empty(); | 184 return headers_decompressed_ && decompressed_headers_.empty(); |
185 } | 185 } |
186 | 186 |
187 } // namespace net | 187 } // namespace net |
OLD | NEW |