| 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_stream_factory_impl_job.h" | 5 #include "net/http/http_stream_factory_impl_job.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) { | 870 int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) { |
| 871 pac_request_ = NULL; | 871 pac_request_ = NULL; |
| 872 | 872 |
| 873 if (result == OK) { | 873 if (result == OK) { |
| 874 // Remove unsupported proxies from the list. | 874 // Remove unsupported proxies from the list. |
| 875 int supported_proxies = | 875 int supported_proxies = |
| 876 ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP | | 876 ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP | |
| 877 ProxyServer::SCHEME_HTTPS | ProxyServer::SCHEME_SOCKS4 | | 877 ProxyServer::SCHEME_HTTPS | ProxyServer::SCHEME_SOCKS4 | |
| 878 ProxyServer::SCHEME_SOCKS5; | 878 ProxyServer::SCHEME_SOCKS5; |
| 879 | 879 |
| 880 if (session_->params().enable_quic_for_proxies) | 880 if (session_->params().enable_quic) |
| 881 supported_proxies |= ProxyServer::SCHEME_QUIC; | 881 supported_proxies |= ProxyServer::SCHEME_QUIC; |
| 882 | 882 |
| 883 proxy_info_.RemoveProxiesWithoutScheme(supported_proxies); | 883 proxy_info_.RemoveProxiesWithoutScheme(supported_proxies); |
| 884 | 884 |
| 885 if (proxy_info_.is_empty()) { | 885 if (proxy_info_.is_empty()) { |
| 886 // No proxies/direct to choose from. This happens when we don't support | 886 // No proxies/direct to choose from. This happens when we don't support |
| 887 // any of the proxies in the returned list. | 887 // any of the proxies in the returned list. |
| 888 result = ERR_NO_SUPPORTED_PROXIES; | 888 result = ERR_NO_SUPPORTED_PROXIES; |
| 889 } else if (using_quic_ && | 889 } else if (using_quic_ && |
| 890 (!proxy_info_.is_quic() && !proxy_info_.is_direct())) { | 890 (!proxy_info_.is_quic() && !proxy_info_.is_direct())) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 IsSpdyAlternative(); | 952 IsSpdyAlternative(); |
| 953 using_spdy_ = false; | 953 using_spdy_ = false; |
| 954 | 954 |
| 955 if (ShouldForceQuic()) | 955 if (ShouldForceQuic()) |
| 956 using_quic_ = true; | 956 using_quic_ = true; |
| 957 | 957 |
| 958 DCHECK(!using_quic_ || session_->params().enable_quic); | 958 DCHECK(!using_quic_ || session_->params().enable_quic); |
| 959 | 959 |
| 960 if (proxy_info_.is_quic()) { | 960 if (proxy_info_.is_quic()) { |
| 961 using_quic_ = true; | 961 using_quic_ = true; |
| 962 DCHECK(session_->params().enable_quic_for_proxies); | 962 DCHECK(session_->params().enable_quic); |
| 963 } | 963 } |
| 964 | 964 |
| 965 if (proxy_info_.is_https() || proxy_info_.is_quic()) { | 965 if (proxy_info_.is_https() || proxy_info_.is_quic()) { |
| 966 InitSSLConfig(&proxy_ssl_config_, /*is_proxy=*/true); | 966 InitSSLConfig(&proxy_ssl_config_, /*is_proxy=*/true); |
| 967 // Disable revocation checking for HTTPS proxies since the revocation | 967 // Disable revocation checking for HTTPS proxies since the revocation |
| 968 // requests are probably going to need to go through the proxy too. | 968 // requests are probably going to need to go through the proxy too. |
| 969 proxy_ssl_config_.rev_checking_enabled = false; | 969 proxy_ssl_config_.rev_checking_enabled = false; |
| 970 } | 970 } |
| 971 if (using_ssl_) { | 971 if (using_ssl_) { |
| 972 InitSSLConfig(&server_ssl_config_, /*is_proxy=*/false); | 972 InitSSLConfig(&server_ssl_config_, /*is_proxy=*/false); |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1808 if (connection_->socket()) { | 1808 if (connection_->socket()) { |
| 1809 ConnectionAttempts socket_attempts; | 1809 ConnectionAttempts socket_attempts; |
| 1810 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1810 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
| 1811 request_->AddConnectionAttempts(socket_attempts); | 1811 request_->AddConnectionAttempts(socket_attempts); |
| 1812 } else { | 1812 } else { |
| 1813 request_->AddConnectionAttempts(connection_->connection_attempts()); | 1813 request_->AddConnectionAttempts(connection_->connection_attempts()); |
| 1814 } | 1814 } |
| 1815 } | 1815 } |
| 1816 | 1816 |
| 1817 } // namespace net | 1817 } // namespace net |
| OLD | NEW |