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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 544223003: Add SetSupportsQuic method to explicitly specify server that supports QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ForceAlternateProtocol if QUIC is enabled. Created 6 years, 3 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/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_) {
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698