diff options
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(); |