diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-30 16:27:18 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-30 16:27:18 +0000 |
commit | e93820236a294194927faf4fb03eed8fff22eb5c (patch) | |
tree | 9103204707f55d208be5564c53c12ce63b949c8c /net | |
parent | fd546751eab9c750856c0b4f23eb39fcf8d27793 (diff) | |
download | chromium_src-e93820236a294194927faf4fb03eed8fff22eb5c.zip chromium_src-e93820236a294194927faf4fb03eed8fff22eb5c.tar.gz chromium_src-e93820236a294194927faf4fb03eed8fff22eb5c.tar.bz2 |
Enable SPDY 3.1 and 3.0 in UrlRequestContextBuilder by default
BUG=372528
Review URL: https://codereview.chromium.org/302893003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273856 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/socket/next_proto.cc | 8 | ||||
-rw-r--r-- | net/socket/next_proto.h | 4 | ||||
-rw-r--r-- | net/url_request/url_request_context_builder.cc | 8 | ||||
-rw-r--r-- | net/url_request/url_request_context_builder.h | 3 |
4 files changed, 22 insertions, 1 deletions
diff --git a/net/socket/next_proto.cc b/net/socket/next_proto.cc index bf9b86e..46fff59 100644 --- a/net/socket/next_proto.cc +++ b/net/socket/next_proto.cc @@ -12,6 +12,14 @@ NextProtoVector NextProtosHttpOnly() { return next_protos; } +NextProtoVector NextProtosDefaults() { + NextProtoVector next_protos; + next_protos.push_back(kProtoHTTP11); + next_protos.push_back(kProtoSPDY3); + next_protos.push_back(kProtoSPDY31); + return next_protos; +} + NextProtoVector NextProtosSpdy3() { NextProtoVector next_protos; next_protos.push_back(kProtoHTTP11); diff --git a/net/socket/next_proto.h b/net/socket/next_proto.h index 797c6ae..92ffee4 100644 --- a/net/socket/next_proto.h +++ b/net/socket/next_proto.h @@ -39,6 +39,10 @@ typedef std::vector<NextProto> NextProtoVector; NET_EXPORT NextProtoVector NextProtosHttpOnly(); +// Default values, which are subject to change over time. Currently just +// SPDY 3 and 3.1. +NET_EXPORT NextProtoVector NextProtosDefaults(); + // All of these also enable QUIC. NET_EXPORT NextProtoVector NextProtosSpdy3(); NET_EXPORT NextProtoVector NextProtosSpdy31(); diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc index 7b2c953..19d5bf4 100644 --- a/net/url_request/url_request_context_builder.cc +++ b/net/url_request/url_request_context_builder.cc @@ -176,7 +176,9 @@ URLRequestContextBuilder::HttpNetworkSessionParams::HttpNetworkSessionParams() host_mapping_rules(NULL), testing_fixed_http_port(0), testing_fixed_https_port(0), - trusted_spdy_proxy() {} + next_protos(NextProtosDefaults()), + use_alternate_protocols(true) { +} URLRequestContextBuilder::HttpNetworkSessionParams::~HttpNetworkSessionParams() {} @@ -277,6 +279,7 @@ URLRequestContext* URLRequestContextBuilder::Build() { network_session_params.http_server_properties = context->http_server_properties(); network_session_params.net_log = context->net_log(); + network_session_params.ignore_certificate_errors = http_network_session_params_.ignore_certificate_errors; network_session_params.host_mapping_rules = @@ -285,8 +288,11 @@ URLRequestContext* URLRequestContextBuilder::Build() { http_network_session_params_.testing_fixed_http_port; network_session_params.testing_fixed_https_port = http_network_session_params_.testing_fixed_https_port; + network_session_params.use_alternate_protocols = + http_network_session_params_.use_alternate_protocols; network_session_params.trusted_spdy_proxy = http_network_session_params_.trusted_spdy_proxy; + network_session_params.next_protos = http_network_session_params_.next_protos; HttpTransactionFactory* http_transaction_factory = NULL; if (http_cache_enabled_) { diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h index 12144b8..be05943a 100644 --- a/net/url_request/url_request_context_builder.h +++ b/net/url_request/url_request_context_builder.h @@ -23,6 +23,7 @@ #include "base/memory/scoped_ptr.h" #include "build/build_config.h" #include "net/base/net_export.h" +#include "net/socket/next_proto.h" namespace net { @@ -65,7 +66,9 @@ class NET_EXPORT URLRequestContextBuilder { HostMappingRules* host_mapping_rules; uint16 testing_fixed_http_port; uint16 testing_fixed_https_port; + NextProtoVector next_protos; std::string trusted_spdy_proxy; + bool use_alternate_protocols; }; URLRequestContextBuilder(); |