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

Unified Diff: net/quic/chromium/quic_http_stream.cc

Issue 2867673002: Split QuicChromiumClientStreamDelegate::OnHeadersAvailable into (Closed)
Patch Set: Rebase Created 3 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/chromium/quic_http_stream.h ('k') | net/quic/chromium/quic_http_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_http_stream.cc
diff --git a/net/quic/chromium/quic_http_stream.cc b/net/quic/chromium/quic_http_stream.cc
index 36e91189b06d59c899d8436358373d6eacaf5485..597f20e26342d866001e5d7a207b32e7a341f9b8 100644
--- a/net/quic/chromium/quic_http_stream.cc
+++ b/net/quic/chromium/quic_http_stream.cc
@@ -433,27 +433,31 @@ void QuicHttpStream::SetPriority(RequestPriority priority) {
priority_ = priority;
}
-void QuicHttpStream::OnHeadersAvailable(const SpdyHeaderBlock& headers,
- size_t frame_len) {
+void QuicHttpStream::OnInitialHeadersAvailable(const SpdyHeaderBlock& headers,
+ size_t frame_len) {
+ DCHECK(!response_headers_received_);
headers_bytes_received_ += frame_len;
- // QuicHttpStream ignores trailers.
- if (response_headers_received_) {
- if (stream_->IsDoneReading()) {
- // Close the read side. If the write side has been closed, this will
- // invoke QuicHttpStream::OnClose to reset the stream.
- stream_->OnFinRead();
- SetResponseStatus(OK);
- }
- return;
- }
-
int rv = ProcessResponseHeaders(headers);
if (rv != ERR_IO_PENDING && !callback_.is_null()) {
DoCallback(rv);
}
}
+void QuicHttpStream::OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers,
+ size_t frame_len) {
+ DCHECK(response_headers_received_);
+ headers_bytes_received_ += frame_len;
+
+ // QuicHttpStream ignores trailers.
+ if (stream_->IsDoneReading()) {
+ // Close the read side. If the write side has been closed, this will
+ // invoke QuicHttpStream::OnClose to reset the stream.
+ stream_->OnFinRead();
+ SetResponseStatus(OK);
+ }
+}
+
void QuicHttpStream::OnDataAvailable() {
if (callback_.is_null()) {
// Data is available, but can't be delivered
« no previous file with comments | « net/quic/chromium/quic_http_stream.h ('k') | net/quic/chromium/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698