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

Side by Side Diff: net/quic/quic_http_stream.cc

Issue 1774703003: QuicChromiumClientStream should only do OnStream after notifying delegate about trailers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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/quic_http_stream.h" 5 #include "net/quic/quic_http_stream.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 void QuicHttpStream::SetPriority(RequestPriority priority) { 435 void QuicHttpStream::SetPriority(RequestPriority priority) {
436 priority_ = priority; 436 priority_ = priority;
437 } 437 }
438 438
439 void QuicHttpStream::OnHeadersAvailable(const SpdyHeaderBlock& headers, 439 void QuicHttpStream::OnHeadersAvailable(const SpdyHeaderBlock& headers,
440 size_t frame_len) { 440 size_t frame_len) {
441 headers_bytes_received_ += frame_len; 441 headers_bytes_received_ += frame_len;
442 442
443 // QuicHttpStream ignores trailers. 443 // QuicHttpStream ignores trailers.
444 if (response_headers_received_) { 444 if (response_headers_received_) {
445 if (stream_->IsDoneReading()) {
446 // Close the read side. If the write side has been closed, this will
447 // invoke QuicHttpStream::OnClose to reset the stream.
448 stream_->OnFinRead();
449 }
450 return; 445 return;
451 } 446 }
452 447
453 int rv = ProcessResponseHeaders(headers); 448 int rv = ProcessResponseHeaders(headers);
454 if (rv != ERR_IO_PENDING && !callback_.is_null()) { 449 if (rv != ERR_IO_PENDING && !callback_.is_null()) {
455 DoCallback(rv); 450 DoCallback(rv);
456 } 451 }
457 } 452 }
458 453
459 void QuicHttpStream::OnDataAvailable() { 454 void QuicHttpStream::OnDataAvailable() {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); 729 closed_stream_sent_bytes_ = stream_->stream_bytes_written();
735 stream_ = nullptr; 730 stream_ = nullptr;
736 731
737 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress 732 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress
738 // read. 733 // read.
739 if (request_body_stream_) 734 if (request_body_stream_)
740 request_body_stream_->Reset(); 735 request_body_stream_->Reset();
741 } 736 }
742 737
743 } // namespace net 738 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698