| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 enable_tcp_fast_open_for_ssl(false), | 89 enable_tcp_fast_open_for_ssl(false), |
| 90 enable_spdy_ping_based_connection_checking(true), | 90 enable_spdy_ping_based_connection_checking(true), |
| 91 enable_http2(true), | 91 enable_http2(true), |
| 92 spdy_session_max_recv_window_size(kSpdySessionMaxRecvWindowSize), | 92 spdy_session_max_recv_window_size(kSpdySessionMaxRecvWindowSize), |
| 93 spdy_stream_max_recv_window_size(kSpdyStreamMaxRecvWindowSize), | 93 spdy_stream_max_recv_window_size(kSpdyStreamMaxRecvWindowSize), |
| 94 time_func(&base::TimeTicks::Now), | 94 time_func(&base::TimeTicks::Now), |
| 95 enable_http2_alternative_service_with_different_host(false), | 95 enable_http2_alternative_service_with_different_host(false), |
| 96 enable_quic_alternative_service_with_different_host(true), | 96 enable_quic_alternative_service_with_different_host(true), |
| 97 enable_quic(false), | 97 enable_quic(false), |
| 98 disable_quic_on_timeout_with_open_streams(false), | 98 disable_quic_on_timeout_with_open_streams(false), |
| 99 enable_quic_port_selection(true), | |
| 100 quic_always_require_handshake_confirmation(false), | 99 quic_always_require_handshake_confirmation(false), |
| 101 quic_disable_connection_pooling(false), | 100 quic_disable_connection_pooling(false), |
| 102 quic_load_server_info_timeout_srtt_multiplier(0.25f), | 101 quic_load_server_info_timeout_srtt_multiplier(0.25f), |
| 103 quic_enable_connection_racing(false), | 102 quic_enable_connection_racing(false), |
| 104 quic_enable_non_blocking_io(false), | 103 quic_enable_non_blocking_io(false), |
| 105 quic_disable_disk_cache(false), | 104 quic_disable_disk_cache(false), |
| 106 quic_prefer_aes(false), | 105 quic_prefer_aes(false), |
| 107 quic_socket_receive_buffer_size(kQuicSocketReceiveBufferSize), | 106 quic_socket_receive_buffer_size(kQuicSocketReceiveBufferSize), |
| 108 quic_delay_tcp_race(true), | 107 quic_delay_tcp_race(true), |
| 109 quic_max_server_configs_stored_in_properties(0u), | 108 quic_max_server_configs_stored_in_properties(0u), |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 params.channel_id_service, | 157 params.channel_id_service, |
| 159 params.transport_security_state, | 158 params.transport_security_state, |
| 160 params.cert_transparency_verifier, | 159 params.cert_transparency_verifier, |
| 161 params.socket_performance_watcher_factory, | 160 params.socket_performance_watcher_factory, |
| 162 params.quic_crypto_client_stream_factory, | 161 params.quic_crypto_client_stream_factory, |
| 163 params.quic_random ? params.quic_random : QuicRandom::GetInstance(), | 162 params.quic_random ? params.quic_random : QuicRandom::GetInstance(), |
| 164 params.quic_clock ? params.quic_clock : new QuicClock(), | 163 params.quic_clock ? params.quic_clock : new QuicClock(), |
| 165 params.quic_max_packet_length, | 164 params.quic_max_packet_length, |
| 166 params.quic_user_agent_id, | 165 params.quic_user_agent_id, |
| 167 params.quic_supported_versions, | 166 params.quic_supported_versions, |
| 168 params.enable_quic_port_selection, | |
| 169 params.quic_always_require_handshake_confirmation, | 167 params.quic_always_require_handshake_confirmation, |
| 170 params.quic_disable_connection_pooling, | 168 params.quic_disable_connection_pooling, |
| 171 params.quic_load_server_info_timeout_srtt_multiplier, | 169 params.quic_load_server_info_timeout_srtt_multiplier, |
| 172 params.quic_enable_connection_racing, | 170 params.quic_enable_connection_racing, |
| 173 params.quic_enable_non_blocking_io, | 171 params.quic_enable_non_blocking_io, |
| 174 params.quic_disable_disk_cache, | 172 params.quic_disable_disk_cache, |
| 175 params.quic_prefer_aes, | 173 params.quic_prefer_aes, |
| 176 params.quic_socket_receive_buffer_size, | 174 params.quic_socket_receive_buffer_size, |
| 177 params.quic_delay_tcp_race, | 175 params.quic_delay_tcp_race, |
| 178 params.quic_max_server_configs_stored_in_properties, | 176 params.quic_max_server_configs_stored_in_properties, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 282 |
| 285 std::unique_ptr<base::Value> HttpNetworkSession::SpdySessionPoolInfoToValue() | 283 std::unique_ptr<base::Value> HttpNetworkSession::SpdySessionPoolInfoToValue() |
| 286 const { | 284 const { |
| 287 return spdy_session_pool_.SpdySessionPoolInfoToValue(); | 285 return spdy_session_pool_.SpdySessionPoolInfoToValue(); |
| 288 } | 286 } |
| 289 | 287 |
| 290 std::unique_ptr<base::Value> HttpNetworkSession::QuicInfoToValue() const { | 288 std::unique_ptr<base::Value> HttpNetworkSession::QuicInfoToValue() const { |
| 291 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 289 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 292 dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue()); | 290 dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue()); |
| 293 dict->SetBoolean("quic_enabled", params_.enable_quic); | 291 dict->SetBoolean("quic_enabled", params_.enable_quic); |
| 294 dict->SetBoolean("enable_quic_port_selection", | |
| 295 params_.enable_quic_port_selection); | |
| 296 std::unique_ptr<base::ListValue> connection_options(new base::ListValue); | 292 std::unique_ptr<base::ListValue> connection_options(new base::ListValue); |
| 297 for (QuicTagVector::const_iterator it = | 293 for (QuicTagVector::const_iterator it = |
| 298 params_.quic_connection_options.begin(); | 294 params_.quic_connection_options.begin(); |
| 299 it != params_.quic_connection_options.end(); ++it) { | 295 it != params_.quic_connection_options.end(); ++it) { |
| 300 connection_options->AppendString("'" + QuicTagToString(*it) + "'"); | 296 connection_options->AppendString("'" + QuicTagToString(*it) + "'"); |
| 301 } | 297 } |
| 302 dict->Set("connection_options", std::move(connection_options)); | 298 dict->Set("connection_options", std::move(connection_options)); |
| 303 | 299 |
| 304 std::unique_ptr<base::ListValue> origins_to_force_quic_on( | 300 std::unique_ptr<base::ListValue> origins_to_force_quic_on( |
| 305 new base::ListValue); | 301 new base::ListValue); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 break; | 415 break; |
| 420 case base::MemoryState::SUSPENDED: | 416 case base::MemoryState::SUSPENDED: |
| 421 // Note: Not supported at present. Fall through. | 417 // Note: Not supported at present. Fall through. |
| 422 case base::MemoryState::UNKNOWN: | 418 case base::MemoryState::UNKNOWN: |
| 423 NOTREACHED(); | 419 NOTREACHED(); |
| 424 break; | 420 break; |
| 425 } | 421 } |
| 426 } | 422 } |
| 427 | 423 |
| 428 } // namespace net | 424 } // namespace net |
| OLD | NEW |