Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: net/quic/chromium/quic_stream_factory.cc

Issue 2453973003: Add a QUIC proxy server to the list of QUIC servers supported at start up (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/chromium/quic_stream_factory.h ('k') | net/quic/chromium/quic_stream_factory_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_stream_factory.cc
diff --git a/net/quic/chromium/quic_stream_factory.cc b/net/quic/chromium/quic_stream_factory.cc
index 1ef5ba524bb5c29c64612ceb6e243fdac1736cd2..5bce4ac6ad511dbe53439ec76ee5f53c3c07c54b 100644
--- a/net/quic/chromium/quic_stream_factory.cc
+++ b/net/quic/chromium/quic_stream_factory.cc
@@ -27,6 +27,7 @@
#include "crypto/openssl_util.h"
#include "net/base/ip_address.h"
#include "net/base/net_errors.h"
+#include "net/base/proxy_delegate.h"
#include "net/cert/cert_verifier.h"
#include "net/cert/ct_verifier.h"
#include "net/dns/host_resolver.h"
@@ -705,6 +706,7 @@ QuicStreamFactory::QuicStreamFactory(
SSLConfigService* ssl_config_service,
ClientSocketFactory* client_socket_factory,
HttpServerProperties* http_server_properties,
+ ProxyDelegate* proxy_delegate,
CertVerifier* cert_verifier,
CTPolicyEnforcer* ct_policy_enforcer,
ChannelIDService* channel_id_service,
@@ -746,6 +748,7 @@ QuicStreamFactory::QuicStreamFactory(
host_resolver_(host_resolver),
client_socket_factory_(client_socket_factory),
http_server_properties_(http_server_properties),
+ proxy_delegate_(proxy_delegate),
transport_security_state_(transport_security_state),
cert_transparency_verifier_(cert_transparency_verifier),
quic_crypto_client_stream_factory_(quic_crypto_client_stream_factory),
@@ -1826,6 +1829,16 @@ void QuicStreamFactory::MaybeInitialize() {
return;
has_initialized_data_ = true;
+
+ // Query the proxy delegate for the default alternative proxy server.
+ ProxyServer default_alternative_proxy_server =
+ proxy_delegate_ ? proxy_delegate_->GetDefaultAlternativeProxy()
+ : ProxyServer();
+ if (default_alternative_proxy_server.is_quic()) {
+ quic_supported_servers_at_startup_.insert(
+ default_alternative_proxy_server.host_port_pair());
+ }
+
for (const std::pair<const url::SchemeHostPort, AlternativeServiceInfoVector>&
key_value : http_server_properties_->alternative_service_map()) {
HostPortPair host_port_pair(key_value.first.host(), key_value.first.port());
« no previous file with comments | « net/quic/chromium/quic_stream_factory.h ('k') | net/quic/chromium/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698