Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 430 void QuicHttpStream::Drain(HttpNetworkSession* session) { | 430 void QuicHttpStream::Drain(HttpNetworkSession* session) { |
| 431 NOTREACHED(); | 431 NOTREACHED(); |
| 432 Close(false); | 432 Close(false); |
| 433 delete this; | 433 delete this; |
| 434 } | 434 } |
| 435 | 435 |
| 436 void QuicHttpStream::PopulateNetErrorDetails(NetErrorDetails* details) { | 436 void QuicHttpStream::PopulateNetErrorDetails(NetErrorDetails* details) { |
| 437 details->connection_info = HttpResponseInfo::CONNECTION_INFO_QUIC1_SPDY3; | 437 details->connection_info = HttpResponseInfo::CONNECTION_INFO_QUIC1_SPDY3; |
| 438 if (was_handshake_confirmed_) | 438 if (was_handshake_confirmed_) |
| 439 details->quic_connection_error = quic_connection_error_; | 439 details->quic_connection_error = quic_connection_error_; |
| 440 stream_request_.PopulateNetErrorDetails(details); | |
|
Ryan Hamilton
2016/03/10 22:46:44
Instead of asking the stream_request_ to ask the s
Zhongyi Shi
2016/03/11 03:56:32
Yes, we can, I knew there's a stream_request_ in q
| |
| 440 } | 441 } |
| 441 | 442 |
| 442 void QuicHttpStream::SetPriority(RequestPriority priority) { | 443 void QuicHttpStream::SetPriority(RequestPriority priority) { |
| 443 priority_ = priority; | 444 priority_ = priority; |
| 444 } | 445 } |
| 445 | 446 |
| 446 void QuicHttpStream::OnHeadersAvailable(const SpdyHeaderBlock& headers, | 447 void QuicHttpStream::OnHeadersAvailable(const SpdyHeaderBlock& headers, |
| 447 size_t frame_len) { | 448 size_t frame_len) { |
| 448 headers_bytes_received_ += frame_len; | 449 headers_bytes_received_ += frame_len; |
| 449 | 450 |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 741 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); | 742 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); |
| 742 stream_ = nullptr; | 743 stream_ = nullptr; |
| 743 | 744 |
| 744 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress | 745 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress |
| 745 // read. | 746 // read. |
| 746 if (request_body_stream_) | 747 if (request_body_stream_) |
| 747 request_body_stream_->Reset(); | 748 request_body_stream_->Reset(); |
| 748 } | 749 } |
| 749 | 750 |
| 750 } // namespace net | 751 } // namespace net |
| OLD | NEW |