Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: net/quic/quic_spdy_stream.cc

Issue 1961573002: Avoids the "re-encode HPACK as SPDY3" step. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update new test Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_spdy_stream.h ('k') | net/quic/quic_spdy_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_spdy_stream.cc
diff --git a/net/quic/quic_spdy_stream.cc b/net/quic/quic_spdy_stream.cc
index b6adeecdc6e3202b2277a1bf955ad748c51d076b..fcd206e6fb793190610add1241c0162ad40f0be4 100644
--- a/net/quic/quic_spdy_stream.cc
+++ b/net/quic/quic_spdy_stream.cc
@@ -30,6 +30,7 @@ QuicSpdyStream::QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session)
headers_decompressed_(false),
priority_(kDefaultPriority),
trailers_decompressed_(false),
+ trailers_delivered_(false),
avoid_empty_nonfin_writes_(FLAGS_quic_avoid_empty_nonfin_writes) {
DCHECK_NE(kCryptoStreamId, id);
// Don't receive any callbacks from the sequencer until headers
@@ -161,6 +162,10 @@ void QuicSpdyStream::MarkTrailersConsumed(size_t bytes_consumed) {
decompressed_trailers_.erase(0, bytes_consumed);
}
+void QuicSpdyStream::MarkTrailersDelivered() {
+ trailers_delivered_ = true;
+}
+
void QuicSpdyStream::ConsumeHeaderList() {
header_list_.Clear();
if (FinishedReadingHeaders()) {
@@ -377,8 +382,13 @@ bool QuicSpdyStream::ParseHeaderStatusCode(SpdyHeaderBlock* header,
bool QuicSpdyStream::FinishedReadingTrailers() const {
// If no further trailing headers are expected, and the decompressed trailers
// (if any) have been consumed, then reading of trailers is finished.
- bool no_more_trailers = fin_received() || trailers_decompressed_;
- return no_more_trailers && decompressed_trailers_.empty();
+ if (!fin_received()) {
+ return false;
+ } else if (!trailers_decompressed_) {
+ return true;
+ } else {
+ return trailers_delivered_ && decompressed_trailers_.empty();
+ }
}
SpdyPriority QuicSpdyStream::priority() const {
« no previous file with comments | « net/quic/quic_spdy_stream.h ('k') | net/quic/quic_spdy_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698