| 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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "net/http/http_response_headers.h" | 46 #include "net/http/http_response_headers.h" |
| 47 #include "net/http/http_response_info.h" | 47 #include "net/http/http_response_info.h" |
| 48 #include "net/http/http_server_properties.h" | 48 #include "net/http/http_server_properties.h" |
| 49 #include "net/http/http_status_code.h" | 49 #include "net/http/http_status_code.h" |
| 50 #include "net/http/http_stream.h" | 50 #include "net/http/http_stream.h" |
| 51 #include "net/http/http_stream_factory.h" | 51 #include "net/http/http_stream_factory.h" |
| 52 #include "net/http/http_util.h" | 52 #include "net/http/http_util.h" |
| 53 #include "net/http/transport_security_state.h" | 53 #include "net/http/transport_security_state.h" |
| 54 #include "net/http/url_security_manager.h" | 54 #include "net/http/url_security_manager.h" |
| 55 #include "net/log/net_log_event_type.h" | 55 #include "net/log/net_log_event_type.h" |
| 56 #include "net/proxy/proxy_server.h" |
| 56 #include "net/socket/client_socket_factory.h" | 57 #include "net/socket/client_socket_factory.h" |
| 57 #include "net/socket/socks_client_socket_pool.h" | 58 #include "net/socket/socks_client_socket_pool.h" |
| 58 #include "net/socket/ssl_client_socket.h" | 59 #include "net/socket/ssl_client_socket.h" |
| 59 #include "net/socket/ssl_client_socket_pool.h" | 60 #include "net/socket/ssl_client_socket_pool.h" |
| 60 #include "net/socket/transport_client_socket_pool.h" | 61 #include "net/socket/transport_client_socket_pool.h" |
| 61 #include "net/spdy/spdy_http_stream.h" | 62 #include "net/spdy/spdy_http_stream.h" |
| 62 #include "net/spdy/spdy_session.h" | 63 #include "net/spdy/spdy_session.h" |
| 63 #include "net/spdy/spdy_session_pool.h" | 64 #include "net/spdy/spdy_session_pool.h" |
| 64 #include "net/ssl/ssl_cert_request_info.h" | 65 #include "net/ssl/ssl_cert_request_info.h" |
| 65 #include "net/ssl/ssl_connection_status_flags.h" | 66 #include "net/ssl/ssl_connection_status_flags.h" |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 } | 450 } |
| 450 stream_.reset(stream); | 451 stream_.reset(stream); |
| 451 server_ssl_config_ = used_ssl_config; | 452 server_ssl_config_ = used_ssl_config; |
| 452 proxy_info_ = used_proxy_info; | 453 proxy_info_ = used_proxy_info; |
| 453 response_.was_alpn_negotiated = stream_request_->was_alpn_negotiated(); | 454 response_.was_alpn_negotiated = stream_request_->was_alpn_negotiated(); |
| 454 response_.alpn_negotiated_protocol = SSLClientSocket::NextProtoToString( | 455 response_.alpn_negotiated_protocol = SSLClientSocket::NextProtoToString( |
| 455 stream_request_->negotiated_protocol()); | 456 stream_request_->negotiated_protocol()); |
| 456 response_.was_fetched_via_spdy = stream_request_->using_spdy(); | 457 response_.was_fetched_via_spdy = stream_request_->using_spdy(); |
| 457 response_.was_fetched_via_proxy = !proxy_info_.is_direct(); | 458 response_.was_fetched_via_proxy = !proxy_info_.is_direct(); |
| 458 if (response_.was_fetched_via_proxy && !proxy_info_.is_empty()) | 459 if (response_.was_fetched_via_proxy && !proxy_info_.is_empty()) |
| 459 response_.proxy_server = proxy_info_.proxy_server().host_port_pair(); | 460 response_.proxy_server = proxy_info_.proxy_server(); |
| 461 else if (!response_.was_fetched_via_proxy && proxy_info_.is_direct()) |
| 462 response_.proxy_server = ProxyServer::Direct(); |
| 463 else |
| 464 response_.proxy_server = ProxyServer(); |
| 460 OnIOComplete(OK); | 465 OnIOComplete(OK); |
| 461 } | 466 } |
| 462 | 467 |
| 463 void HttpNetworkTransaction::OnBidirectionalStreamImplReady( | 468 void HttpNetworkTransaction::OnBidirectionalStreamImplReady( |
| 464 const SSLConfig& used_ssl_config, | 469 const SSLConfig& used_ssl_config, |
| 465 const ProxyInfo& used_proxy_info, | 470 const ProxyInfo& used_proxy_info, |
| 466 BidirectionalStreamImpl* stream) { | 471 BidirectionalStreamImpl* stream) { |
| 467 NOTREACHED(); | 472 NOTREACHED(); |
| 468 } | 473 } |
| 469 | 474 |
| (...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 DCHECK(stream_request_); | 1635 DCHECK(stream_request_); |
| 1631 | 1636 |
| 1632 // Since the transaction can restart with auth credentials, it may create a | 1637 // Since the transaction can restart with auth credentials, it may create a |
| 1633 // stream more than once. Accumulate all of the connection attempts across | 1638 // stream more than once. Accumulate all of the connection attempts across |
| 1634 // those streams by appending them to the vector: | 1639 // those streams by appending them to the vector: |
| 1635 for (const auto& attempt : stream_request_->connection_attempts()) | 1640 for (const auto& attempt : stream_request_->connection_attempts()) |
| 1636 connection_attempts_.push_back(attempt); | 1641 connection_attempts_.push_back(attempt); |
| 1637 } | 1642 } |
| 1638 | 1643 |
| 1639 } // namespace net | 1644 } // namespace net |
| OLD | NEW |