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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 time_func(&base::TimeTicks::Now), | 80 time_func(&base::TimeTicks::Now), |
81 force_spdy_over_ssl(true), | 81 force_spdy_over_ssl(true), |
82 force_spdy_always(false), | 82 force_spdy_always(false), |
83 use_alternate_protocols(false), | 83 use_alternate_protocols(false), |
84 alternate_protocol_probability_threshold(1), | 84 alternate_protocol_probability_threshold(1), |
85 enable_websocket_over_spdy(false), | 85 enable_websocket_over_spdy(false), |
86 enable_quic(false), | 86 enable_quic(false), |
87 enable_quic_port_selection(true), | 87 enable_quic_port_selection(true), |
88 enable_quic_pacing(false), | 88 enable_quic_pacing(false), |
89 enable_quic_time_based_loss_detection(false), | 89 enable_quic_time_based_loss_detection(false), |
90 enable_quic_persist_server_info(true), | |
91 quic_clock(NULL), | 90 quic_clock(NULL), |
92 quic_random(NULL), | 91 quic_random(NULL), |
93 quic_max_packet_length(kDefaultMaxPacketSize), | 92 quic_max_packet_length(kDefaultMaxPacketSize), |
94 enable_user_alternate_protocol_ports(false), | 93 enable_user_alternate_protocol_ports(false), |
95 quic_crypto_client_stream_factory(NULL) { | 94 quic_crypto_client_stream_factory(NULL) { |
96 quic_supported_versions.push_back(QUIC_VERSION_19); | 95 quic_supported_versions.push_back(QUIC_VERSION_19); |
97 } | 96 } |
98 | 97 |
99 HttpNetworkSession::Params::~Params() {} | 98 HttpNetworkSession::Params::~Params() {} |
100 | 99 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 base::Value* HttpNetworkSession::QuicInfoToValue() const { | 245 base::Value* HttpNetworkSession::QuicInfoToValue() const { |
247 base::DictionaryValue* dict = new base::DictionaryValue(); | 246 base::DictionaryValue* dict = new base::DictionaryValue(); |
248 dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue()); | 247 dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue()); |
249 dict->SetBoolean("quic_enabled", params_.enable_quic); | 248 dict->SetBoolean("quic_enabled", params_.enable_quic); |
250 dict->SetBoolean("enable_quic_port_selection", | 249 dict->SetBoolean("enable_quic_port_selection", |
251 params_.enable_quic_port_selection); | 250 params_.enable_quic_port_selection); |
252 dict->SetBoolean("enable_quic_pacing", | 251 dict->SetBoolean("enable_quic_pacing", |
253 params_.enable_quic_pacing); | 252 params_.enable_quic_pacing); |
254 dict->SetBoolean("enable_quic_time_based_loss_detection", | 253 dict->SetBoolean("enable_quic_time_based_loss_detection", |
255 params_.enable_quic_time_based_loss_detection); | 254 params_.enable_quic_time_based_loss_detection); |
256 dict->SetBoolean("enable_quic_persist_server_info", | |
257 params_.enable_quic_persist_server_info); | |
258 dict->SetString("origin_to_force_quic_on", | 255 dict->SetString("origin_to_force_quic_on", |
259 params_.origin_to_force_quic_on.ToString()); | 256 params_.origin_to_force_quic_on.ToString()); |
260 return dict; | 257 return dict; |
261 } | 258 } |
262 | 259 |
263 void HttpNetworkSession::CloseAllConnections() { | 260 void HttpNetworkSession::CloseAllConnections() { |
264 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 261 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
265 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 262 websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
266 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); | 263 spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED); |
267 quic_stream_factory_.CloseAllSessions(ERR_ABORTED); | 264 quic_stream_factory_.CloseAllSessions(ERR_ABORTED); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 case WEBSOCKET_SOCKET_POOL: | 299 case WEBSOCKET_SOCKET_POOL: |
303 return websocket_socket_pool_manager_.get(); | 300 return websocket_socket_pool_manager_.get(); |
304 default: | 301 default: |
305 NOTREACHED(); | 302 NOTREACHED(); |
306 break; | 303 break; |
307 } | 304 } |
308 return NULL; | 305 return NULL; |
309 } | 306 } |
310 | 307 |
311 } // namespace net | 308 } // namespace net |
OLD | NEW |