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/chromium/quic_http_stream.h" | 5 #include "net/quic/chromium/quic_http_stream.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 is_first_stream = stream_->IsFirstStream(); | 416 is_first_stream = stream_->IsFirstStream(); |
417 if (is_first_stream) { | 417 if (is_first_stream) { |
418 load_timing_info->socket_reused = false; | 418 load_timing_info->socket_reused = false; |
419 load_timing_info->connect_timing = connect_timing_; | 419 load_timing_info->connect_timing = connect_timing_; |
420 } else { | 420 } else { |
421 load_timing_info->socket_reused = true; | 421 load_timing_info->socket_reused = true; |
422 } | 422 } |
423 return true; | 423 return true; |
424 } | 424 } |
425 | 425 |
| 426 bool QuicHttpStream::GetAlternativeService( |
| 427 AlternativeService* alternative_service) const { |
| 428 alternative_service->protocol = kProtoQUIC; |
| 429 alternative_service->host = server_id_.host(); |
| 430 alternative_service->port = server_id_.port(); |
| 431 return true; |
| 432 } |
| 433 |
426 void QuicHttpStream::PopulateNetErrorDetails(NetErrorDetails* details) { | 434 void QuicHttpStream::PopulateNetErrorDetails(NetErrorDetails* details) { |
427 details->connection_info = ConnectionInfoFromQuicVersion(quic_version_); | 435 details->connection_info = ConnectionInfoFromQuicVersion(quic_version_); |
428 if (was_handshake_confirmed_) | 436 if (was_handshake_confirmed_) |
429 details->quic_connection_error = quic_connection_error_; | 437 details->quic_connection_error = quic_connection_error_; |
430 if (session_) { | 438 if (session_) { |
431 session_->PopulateNetErrorDetails(details); | 439 session_->PopulateNetErrorDetails(details); |
432 } else { | 440 } else { |
433 details->quic_port_migration_detected = port_migration_detected_; | 441 details->quic_port_migration_detected = port_migration_detected_; |
434 } | 442 } |
435 } | 443 } |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 if (!response_headers_received_ && | 897 if (!response_headers_received_ && |
890 http_server_properties_->IsAlternativeServiceBroken(AlternativeService( | 898 http_server_properties_->IsAlternativeServiceBroken(AlternativeService( |
891 kProtoQUIC, server_id_.host(), server_id_.port()))) { | 899 kProtoQUIC, server_id_.host(), server_id_.port()))) { |
892 return ERR_QUIC_BROKEN_ERROR; | 900 return ERR_QUIC_BROKEN_ERROR; |
893 } | 901 } |
894 | 902 |
895 return ERR_QUIC_PROTOCOL_ERROR; | 903 return ERR_QUIC_PROTOCOL_ERROR; |
896 } | 904 } |
897 | 905 |
898 } // namespace net | 906 } // namespace net |
OLD | NEW |