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" |
11 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
12 #include "net/base/load_flags.h" | 12 #include "net/base/load_flags.h" |
13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
14 #include "net/http/http_response_headers.h" | 14 #include "net/http/http_response_headers.h" |
| 15 #include "net/http/http_response_info.h" |
15 #include "net/http/http_util.h" | 16 #include "net/http/http_util.h" |
16 #include "net/quic/quic_chromium_client_session.h" | 17 #include "net/quic/quic_chromium_client_session.h" |
17 #include "net/quic/quic_chromium_client_stream.h" | 18 #include "net/quic/quic_chromium_client_stream.h" |
18 #include "net/quic/quic_client_promised_info.h" | 19 #include "net/quic/quic_client_promised_info.h" |
19 #include "net/quic/quic_http_utils.h" | 20 #include "net/quic/quic_http_utils.h" |
20 #include "net/quic/quic_utils.h" | 21 #include "net/quic/quic_utils.h" |
21 #include "net/quic/spdy_utils.h" | 22 #include "net/quic/spdy_utils.h" |
22 #include "net/socket/next_proto.h" | 23 #include "net/socket/next_proto.h" |
23 #include "net/spdy/spdy_frame_builder.h" | 24 #include "net/spdy/spdy_frame_builder.h" |
24 #include "net/spdy/spdy_framer.h" | 25 #include "net/spdy/spdy_framer.h" |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 461 |
461 *endpoint = session_->peer_address(); | 462 *endpoint = session_->peer_address(); |
462 return true; | 463 return true; |
463 } | 464 } |
464 | 465 |
465 Error QuicHttpStream::GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | 466 Error QuicHttpStream::GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
466 std::vector<uint8_t>* out) { | 467 std::vector<uint8_t>* out) { |
467 return session_->GetTokenBindingSignature(key, out); | 468 return session_->GetTokenBindingSignature(key, out); |
468 } | 469 } |
469 | 470 |
470 void QuicHttpStream::Drain(HttpNetworkSession* session) { | 471 void QuicHttpStream::Drain(HttpNetworkSession* session, |
| 472 scoped_ptr<HttpResponseInfo> response_info) { |
471 NOTREACHED(); | 473 NOTREACHED(); |
472 Close(false); | 474 Close(false); |
473 delete this; | 475 delete this; |
474 } | 476 } |
475 | 477 |
476 void QuicHttpStream::PopulateNetErrorDetails(NetErrorDetails* details) { | 478 void QuicHttpStream::PopulateNetErrorDetails(NetErrorDetails* details) { |
477 details->connection_info = HttpResponseInfo::CONNECTION_INFO_QUIC1_SPDY3; | 479 details->connection_info = HttpResponseInfo::CONNECTION_INFO_QUIC1_SPDY3; |
478 if (was_handshake_confirmed_) | 480 if (was_handshake_confirmed_) |
479 details->quic_connection_error = quic_connection_error_; | 481 details->quic_connection_error = quic_connection_error_; |
480 if (session_) { | 482 if (session_) { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); | 789 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); |
788 stream_ = nullptr; | 790 stream_ = nullptr; |
789 | 791 |
790 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress | 792 // If |request_body_stream_| is non-NULL, Reset it, to abort any in progress |
791 // read. | 793 // read. |
792 if (request_body_stream_) | 794 if (request_body_stream_) |
793 request_body_stream_->Reset(); | 795 request_body_stream_->Reset(); |
794 } | 796 } |
795 | 797 |
796 } // namespace net | 798 } // namespace net |
OLD | NEW |