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 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
729 int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) { | 729 int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) { |
730 pac_request_ = NULL; | 730 pac_request_ = NULL; |
731 | 731 |
732 if (result == OK) { | 732 if (result == OK) { |
733 // Remove unsupported proxies from the list. | 733 // Remove unsupported proxies from the list. |
734 int supported_proxies = | 734 int supported_proxies = |
735 ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP | | 735 ProxyServer::SCHEME_DIRECT | ProxyServer::SCHEME_HTTP | |
736 ProxyServer::SCHEME_HTTPS | ProxyServer::SCHEME_SOCKS4 | | 736 ProxyServer::SCHEME_HTTPS | ProxyServer::SCHEME_SOCKS4 | |
737 ProxyServer::SCHEME_SOCKS5; | 737 ProxyServer::SCHEME_SOCKS5; |
738 | 738 |
739 if (session_->params().enable_quic) | 739 if (session_->params().is_enable_quic_for_new_streams()) |
Bence
2016/12/02 18:53:26
I believe this should be gated on both:
if (sessio
pmarko
2016/12/08 17:02:00
The way I've done it in my first attempt is that e
Bence
2016/12/08 17:41:59
Okay, I see. I think what you are doing is fine.
pmarko
2016/12/08 19:56:54
OK thanks! I've added that information to the meth
| |
740 supported_proxies |= ProxyServer::SCHEME_QUIC; | 740 supported_proxies |= ProxyServer::SCHEME_QUIC; |
741 | 741 |
742 proxy_info_.RemoveProxiesWithoutScheme(supported_proxies); | 742 proxy_info_.RemoveProxiesWithoutScheme(supported_proxies); |
743 | 743 |
744 if (proxy_info_.is_empty()) { | 744 if (proxy_info_.is_empty()) { |
745 // No proxies/direct to choose from. This happens when we don't support | 745 // No proxies/direct to choose from. This happens when we don't support |
746 // any of the proxies in the returned list. | 746 // any of the proxies in the returned list. |
747 result = ERR_NO_SUPPORTED_PROXIES; | 747 result = ERR_NO_SUPPORTED_PROXIES; |
748 } else if (using_quic_ && | 748 } else if (using_quic_ && |
749 (!proxy_info_.is_quic() && !proxy_info_.is_direct())) { | 749 (!proxy_info_.is_quic() && !proxy_info_.is_direct())) { |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1499 | 1499 |
1500 ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 1500 ConnectionAttempts socket_attempts = connection_->connection_attempts(); |
1501 if (connection_->socket()) { | 1501 if (connection_->socket()) { |
1502 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1502 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
1503 } | 1503 } |
1504 | 1504 |
1505 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 1505 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); |
1506 } | 1506 } |
1507 | 1507 |
1508 } // namespace net | 1508 } // namespace net |
OLD | NEW |