Chromium Code Reviews| 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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/debug/stack_trace.h" | 10 #include "base/debug/stack_trace.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 alternate_protocol_probability_threshold(1), | 85 alternate_protocol_probability_threshold(1), |
| 86 enable_quic(false), | 86 enable_quic(false), |
| 87 enable_quic_for_proxies(false), | 87 enable_quic_for_proxies(false), |
| 88 enable_quic_port_selection(true), | 88 enable_quic_port_selection(true), |
| 89 quic_always_require_handshake_confirmation(false), | 89 quic_always_require_handshake_confirmation(false), |
| 90 quic_disable_connection_pooling(false), | 90 quic_disable_connection_pooling(false), |
| 91 quic_load_server_info_timeout_srtt_multiplier(0.25f), | 91 quic_load_server_info_timeout_srtt_multiplier(0.25f), |
| 92 quic_enable_connection_racing(false), | 92 quic_enable_connection_racing(false), |
| 93 quic_enable_non_blocking_io(false), | 93 quic_enable_non_blocking_io(false), |
| 94 quic_disable_disk_cache(false), | 94 quic_disable_disk_cache(false), |
| 95 quic_max_number_of_lossy_connections(0), | |
| 96 quic_packet_loss_threshold(1000.0f), | |
|
Ryan Hamilton
2015/03/23 02:31:05
Is this value a percent or a fraction?
ramant (doing other things)
2015/03/24 03:07:22
Defined it as fraction.
| |
| 95 quic_socket_receive_buffer_size(kDefaultSocketReceiveBuffer), | 97 quic_socket_receive_buffer_size(kDefaultSocketReceiveBuffer), |
| 96 quic_clock(NULL), | 98 quic_clock(NULL), |
| 97 quic_random(NULL), | 99 quic_random(NULL), |
| 98 quic_max_packet_length(kDefaultMaxPacketSize), | 100 quic_max_packet_length(kDefaultMaxPacketSize), |
| 99 enable_user_alternate_protocol_ports(false), | 101 enable_user_alternate_protocol_ports(false), |
| 100 quic_crypto_client_stream_factory(NULL), | 102 quic_crypto_client_stream_factory(NULL), |
| 101 proxy_delegate(NULL) { | 103 proxy_delegate(NULL) { |
| 102 quic_supported_versions.push_back(QUIC_VERSION_24); | 104 quic_supported_versions.push_back(QUIC_VERSION_24); |
| 103 } | 105 } |
| 104 | 106 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 132 params.quic_max_packet_length, | 134 params.quic_max_packet_length, |
| 133 params.quic_user_agent_id, | 135 params.quic_user_agent_id, |
| 134 params.quic_supported_versions, | 136 params.quic_supported_versions, |
| 135 params.enable_quic_port_selection, | 137 params.enable_quic_port_selection, |
| 136 params.quic_always_require_handshake_confirmation, | 138 params.quic_always_require_handshake_confirmation, |
| 137 params.quic_disable_connection_pooling, | 139 params.quic_disable_connection_pooling, |
| 138 params.quic_load_server_info_timeout_srtt_multiplier, | 140 params.quic_load_server_info_timeout_srtt_multiplier, |
| 139 params.quic_enable_connection_racing, | 141 params.quic_enable_connection_racing, |
| 140 params.quic_enable_non_blocking_io, | 142 params.quic_enable_non_blocking_io, |
| 141 params.quic_disable_disk_cache, | 143 params.quic_disable_disk_cache, |
| 144 params.quic_max_number_of_lossy_connections, | |
| 145 params.quic_packet_loss_threshold, | |
| 142 params.quic_socket_receive_buffer_size, | 146 params.quic_socket_receive_buffer_size, |
| 143 params.quic_connection_options), | 147 params.quic_connection_options), |
| 144 spdy_session_pool_(params.host_resolver, | 148 spdy_session_pool_(params.host_resolver, |
| 145 params.ssl_config_service, | 149 params.ssl_config_service, |
| 146 params.http_server_properties, | 150 params.http_server_properties, |
| 147 params.transport_security_state, | 151 params.transport_security_state, |
| 148 params.force_spdy_single_domain, | 152 params.force_spdy_single_domain, |
| 149 params.enable_spdy_compression, | 153 params.enable_spdy_compression, |
| 150 params.enable_spdy_ping_based_connection_checking, | 154 params.enable_spdy_ping_based_connection_checking, |
| 151 params.spdy_default_protocol, | 155 params.spdy_default_protocol, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 } | 255 } |
| 252 | 256 |
| 253 base::Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { | 257 base::Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { |
| 254 return spdy_session_pool_.SpdySessionPoolInfoToValue(); | 258 return spdy_session_pool_.SpdySessionPoolInfoToValue(); |
| 255 } | 259 } |
| 256 | 260 |
| 257 base::Value* HttpNetworkSession::QuicInfoToValue() const { | 261 base::Value* HttpNetworkSession::QuicInfoToValue() const { |
| 258 base::DictionaryValue* dict = new base::DictionaryValue(); | 262 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 259 dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue()); | 263 dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue()); |
| 260 dict->SetBoolean("quic_enabled", params_.enable_quic); | 264 dict->SetBoolean("quic_enabled", params_.enable_quic); |
| 265 dict->SetBoolean("quic_disabled_due_to_packet_loss", | |
| 266 quic_stream_factory_.quic_is_disabled()); | |
|
Ryan Hamilton
2015/03/23 02:31:06
I think we need to track this per-port (or perhaps
ramant (doing other things)
2015/03/24 03:07:22
Tracked it by port.
| |
| 261 dict->SetBoolean("quic_enabled_for_proxies", params_.enable_quic_for_proxies); | 267 dict->SetBoolean("quic_enabled_for_proxies", params_.enable_quic_for_proxies); |
| 262 dict->SetBoolean("enable_quic_port_selection", | 268 dict->SetBoolean("enable_quic_port_selection", |
| 263 params_.enable_quic_port_selection); | 269 params_.enable_quic_port_selection); |
| 264 base::ListValue* connection_options = new base::ListValue; | 270 base::ListValue* connection_options = new base::ListValue; |
| 265 for (QuicTagVector::const_iterator it = | 271 for (QuicTagVector::const_iterator it = |
| 266 params_.quic_connection_options.begin(); | 272 params_.quic_connection_options.begin(); |
| 267 it != params_.quic_connection_options.end(); ++it) { | 273 it != params_.quic_connection_options.end(); ++it) { |
| 268 connection_options->AppendString("'" + QuicUtils::TagToString(*it) + "'"); | 274 connection_options->AppendString("'" + QuicUtils::TagToString(*it) + "'"); |
| 269 } | 275 } |
| 270 dict->Set("connection_options", connection_options); | 276 dict->Set("connection_options", connection_options); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 316 case WEBSOCKET_SOCKET_POOL: | 322 case WEBSOCKET_SOCKET_POOL: |
| 317 return websocket_socket_pool_manager_.get(); | 323 return websocket_socket_pool_manager_.get(); |
| 318 default: | 324 default: |
| 319 NOTREACHED(); | 325 NOTREACHED(); |
| 320 break; | 326 break; |
| 321 } | 327 } |
| 322 return NULL; | 328 return NULL; |
| 323 } | 329 } |
| 324 | 330 |
| 325 } // namespace net | 331 } // namespace net |
| OLD | NEW |