| 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/core/quic_spdy_stream.h" | 5 #include "net/quic/core/quic_spdy_stream.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "net/quic/core/quic_spdy_session.h" | 9 #include "net/quic/core/quic_spdy_session.h" |
| 10 #include "net/quic/core/quic_utils.h" | 10 #include "net/quic/core/quic_utils.h" |
| 11 #include "net/quic/core/quic_write_blocked_list.h" | 11 #include "net/quic/core/quic_write_blocked_list.h" |
| 12 #include "net/quic/core/spdy_utils.h" | 12 #include "net/quic/core/spdy_utils.h" |
| 13 #include "net/quic/platform/api/quic_bug_tracker.h" | 13 #include "net/quic/platform/api/quic_bug_tracker.h" |
| 14 #include "net/quic/platform/api/quic_logging.h" | 14 #include "net/quic/platform/api/quic_logging.h" |
| 15 #include "net/quic/platform/api/quic_string_piece.h" | 15 #include "net/quic/platform/api/quic_string_piece.h" |
| 16 #include "net/quic/platform/api/quic_text_utils.h" | 16 #include "net/quic/platform/api/quic_text_utils.h" |
| 17 | 17 |
| 18 using base::IntToString; | 18 using base::IntToString; |
| 19 using std::string; | 19 using std::string; |
| 20 | 20 |
| 21 namespace net { | 21 namespace net { |
| 22 #define ENDPOINT \ | 22 #define ENDPOINT \ |
| 23 (session()->perspective() == Perspective::IS_SERVER ? "Server: " : "Client:" \ | 23 (session()->perspective() == Perspective::IS_SERVER ? "Server: " : "Client:" \ |
| 24 " ") | 24 " ") |
| 25 | 25 |
| 26 QuicSpdyStream::QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session) | 26 QuicSpdyStream::QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session) |
| 27 : QuicStream(id, spdy_session), | 27 : QuicStream(id, spdy_session), |
| 28 spdy_session_(spdy_session), | 28 spdy_session_(spdy_session), |
| 29 visitor_(nullptr), | 29 visitor_(nullptr), |
| 30 allow_bidirectional_data_(false), | |
| 31 headers_decompressed_(false), | 30 headers_decompressed_(false), |
| 32 priority_(kDefaultPriority), | 31 priority_(kDefaultPriority), |
| 33 trailers_decompressed_(false), | 32 trailers_decompressed_(false), |
| 34 trailers_consumed_(false) { | 33 trailers_consumed_(false) { |
| 35 DCHECK_NE(kCryptoStreamId, id); | 34 DCHECK_NE(kCryptoStreamId, id); |
| 36 // Don't receive any callbacks from the sequencer until headers | 35 // Don't receive any callbacks from the sequencer until headers |
| 37 // are complete. | 36 // are complete. |
| 38 sequencer()->SetBlockedUntilFlush(); | 37 sequencer()->SetBlockedUntilFlush(); |
| 39 spdy_session_->RegisterStreamPriority(id, priority_); | 38 spdy_session_->RegisterStreamPriority(id, priority_); |
| 40 } | 39 } |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) { | 317 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) { |
| 319 if (spdy_session_->headers_stream() != nullptr && | 318 if (spdy_session_->headers_stream() != nullptr && |
| 320 spdy_session_->force_hol_blocking()) { | 319 spdy_session_->force_hol_blocking()) { |
| 321 return spdy_session_->WritevStreamData(id(), iov, offset, fin, | 320 return spdy_session_->WritevStreamData(id(), iov, offset, fin, |
| 322 std::move(ack_listener)); | 321 std::move(ack_listener)); |
| 323 } | 322 } |
| 324 return QuicStream::WritevDataInner(iov, offset, fin, std::move(ack_listener)); | 323 return QuicStream::WritevDataInner(iov, offset, fin, std::move(ack_listener)); |
| 325 } | 324 } |
| 326 | 325 |
| 327 } // namespace net | 326 } // namespace net |
| OLD | NEW |