| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/http/http_network_session.h" | 5 #include "net/http/http_network_session.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 http_auth_handler_factory(NULL), | 84 http_auth_handler_factory(NULL), |
| 85 net_log(NULL), | 85 net_log(NULL), |
| 86 host_mapping_rules(NULL), | 86 host_mapping_rules(NULL), |
| 87 socket_performance_watcher_factory(NULL), | 87 socket_performance_watcher_factory(NULL), |
| 88 ignore_certificate_errors(false), | 88 ignore_certificate_errors(false), |
| 89 testing_fixed_http_port(0), | 89 testing_fixed_http_port(0), |
| 90 testing_fixed_https_port(0), | 90 testing_fixed_https_port(0), |
| 91 enable_tcp_fast_open_for_ssl(false), | 91 enable_tcp_fast_open_for_ssl(false), |
| 92 enable_spdy_ping_based_connection_checking(true), | 92 enable_spdy_ping_based_connection_checking(true), |
| 93 spdy_default_protocol(kProtoUnknown), | 93 spdy_default_protocol(kProtoUnknown), |
| 94 enable_spdy31(false), | |
| 95 enable_http2(true), | 94 enable_http2(true), |
| 96 spdy_session_max_recv_window_size(kSpdySessionMaxRecvWindowSize), | 95 spdy_session_max_recv_window_size(kSpdySessionMaxRecvWindowSize), |
| 97 spdy_stream_max_recv_window_size(kSpdyStreamMaxRecvWindowSize), | 96 spdy_stream_max_recv_window_size(kSpdyStreamMaxRecvWindowSize), |
| 98 time_func(&base::TimeTicks::Now), | 97 time_func(&base::TimeTicks::Now), |
| 99 enable_http2_alternative_service_with_different_host(false), | 98 enable_http2_alternative_service_with_different_host(false), |
| 100 enable_quic_alternative_service_with_different_host(true), | 99 enable_quic_alternative_service_with_different_host(true), |
| 101 enable_priority_dependencies(true), | 100 enable_priority_dependencies(true), |
| 102 enable_quic(false), | 101 enable_quic(false), |
| 103 disable_quic_on_timeout_with_open_streams(false), | 102 disable_quic_on_timeout_with_open_streams(false), |
| 104 enable_quic_port_selection(true), | 103 enable_quic_port_selection(true), |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 220 |
| 222 // TODO(rtenneti): https://crbug.com/116575 | 221 // TODO(rtenneti): https://crbug.com/116575 |
| 223 // Consider combining the NextProto and AlternateProtocol. | 222 // Consider combining the NextProto and AlternateProtocol. |
| 224 if (params_.enable_http2) { | 223 if (params_.enable_http2) { |
| 225 next_protos_.push_back(kProtoHTTP2); | 224 next_protos_.push_back(kProtoHTTP2); |
| 226 AlternateProtocol alternate = AlternateProtocolFromNextProto(kProtoHTTP2); | 225 AlternateProtocol alternate = AlternateProtocolFromNextProto(kProtoHTTP2); |
| 227 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = | 226 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = |
| 228 true; | 227 true; |
| 229 } | 228 } |
| 230 | 229 |
| 231 if (params_.enable_spdy31) { | |
| 232 next_protos_.push_back(kProtoSPDY31); | |
| 233 AlternateProtocol alternate = AlternateProtocolFromNextProto(kProtoSPDY31); | |
| 234 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = | |
| 235 true; | |
| 236 } | |
| 237 | |
| 238 if (params_.enable_quic) { | 230 if (params_.enable_quic) { |
| 239 AlternateProtocol alternate = | 231 AlternateProtocol alternate = |
| 240 AlternateProtocolFromNextProto(kProtoQUIC1SPDY3); | 232 AlternateProtocolFromNextProto(kProtoQUIC1SPDY3); |
| 241 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = | 233 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = |
| 242 true; | 234 true; |
| 243 } | 235 } |
| 244 | 236 |
| 245 next_protos_.push_back(kProtoHTTP11); | 237 next_protos_.push_back(kProtoHTTP11); |
| 246 | 238 |
| 247 http_server_properties_->SetMaxServerConfigsStoredInProperties( | 239 http_server_properties_->SetMaxServerConfigsStoredInProperties( |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 case WEBSOCKET_SOCKET_POOL: | 393 case WEBSOCKET_SOCKET_POOL: |
| 402 return websocket_socket_pool_manager_.get(); | 394 return websocket_socket_pool_manager_.get(); |
| 403 default: | 395 default: |
| 404 NOTREACHED(); | 396 NOTREACHED(); |
| 405 break; | 397 break; |
| 406 } | 398 } |
| 407 return NULL; | 399 return NULL; |
| 408 } | 400 } |
| 409 | 401 |
| 410 } // namespace net | 402 } // namespace net |
| OLD | NEW |