Chromium Code Reviews| Index: net/url_request/url_request_context_builder.cc |
| diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc |
| index 93ee0e2eaffa7642bf67a642633d4fc1dda22cf3..61dfef0c45733615a3e80b35391557bb56faec88 100644 |
| --- a/net/url_request/url_request_context_builder.cc |
| +++ b/net/url_request/url_request_context_builder.cc |
| @@ -193,7 +193,8 @@ URLRequestContextBuilder::HttpNetworkSessionParams::HttpNetworkSessionParams() |
| testing_fixed_http_port(0), |
| testing_fixed_https_port(0), |
| next_protos(NextProtosDefaults()), |
| - use_alternate_protocols(true) { |
| + use_alternate_protocols(true), |
| + enable_quic(false) { |
| } |
| URLRequestContextBuilder::HttpNetworkSessionParams::~HttpNetworkSessionParams() |
| @@ -236,6 +237,13 @@ void URLRequestContextBuilder::SetSpdyAndQuicEnabled(bool spdy_enabled, |
| bool quic_enabled) { |
| http_network_session_params_.next_protos = |
| NextProtosWithSpdyAndQuic(spdy_enabled, quic_enabled); |
| + http_network_session_params_.enable_quic = quic_enabled; |
| + |
| + // TODO(mef): Figure out why QUIC doesn't work without force. |
| + if (quic_enabled) { |
| + AlternateProtocolInfo pair(443, QUIC, 1); |
| + HttpServerPropertiesImpl::ForceAlternateProtocol(pair); |
|
Ryan Hamilton
2014/09/10 20:58:18
Please do not actually land this :>
mef
2014/09/12 19:44:33
Done. I mean undone.
|
| + } |
| } |
| URLRequestContext* URLRequestContextBuilder::Build() { |
| @@ -352,6 +360,7 @@ URLRequestContext* URLRequestContextBuilder::Build() { |
| network_session_params.trusted_spdy_proxy = |
| http_network_session_params_.trusted_spdy_proxy; |
| network_session_params.next_protos = http_network_session_params_.next_protos; |
| + network_session_params.enable_quic = http_network_session_params_.enable_quic; |
| HttpTransactionFactory* http_transaction_factory = NULL; |
| if (http_cache_enabled_) { |