| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 enable_spdy_compression(true), | 74 enable_spdy_compression(true), |
| 75 enable_spdy_ping_based_connection_checking(true), | 75 enable_spdy_ping_based_connection_checking(true), |
| 76 spdy_default_protocol(kProtoUnknown), | 76 spdy_default_protocol(kProtoUnknown), |
| 77 spdy_stream_initial_recv_window_size(0), | 77 spdy_stream_initial_recv_window_size(0), |
| 78 spdy_initial_max_concurrent_streams(0), | 78 spdy_initial_max_concurrent_streams(0), |
| 79 spdy_max_concurrent_streams_limit(0), | 79 spdy_max_concurrent_streams_limit(0), |
| 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(0), |
| 84 enable_websocket_over_spdy(false), | 85 enable_websocket_over_spdy(false), |
| 85 enable_quic(false), | 86 enable_quic(false), |
| 86 enable_quic_port_selection(true), | 87 enable_quic_port_selection(true), |
| 87 enable_quic_pacing(false), | 88 enable_quic_pacing(false), |
| 88 enable_quic_time_based_loss_detection(false), | 89 enable_quic_time_based_loss_detection(false), |
| 89 enable_quic_persist_server_info(false), | 90 enable_quic_persist_server_info(false), |
| 90 quic_clock(NULL), | 91 quic_clock(NULL), |
| 91 quic_random(NULL), | 92 quic_random(NULL), |
| 92 quic_max_packet_length(kDefaultMaxPacketSize), | 93 quic_max_packet_length(kDefaultMaxPacketSize), |
| 93 enable_user_alternate_protocol_ports(false), | 94 enable_user_alternate_protocol_ports(false), |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 continue; | 176 continue; |
| 176 } | 177 } |
| 177 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = | 178 enabled_protocols_[alternate - ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION] = |
| 178 true; | 179 true; |
| 179 } | 180 } |
| 180 } | 181 } |
| 181 | 182 |
| 182 if (HpackHuffmanAggregator::UseAggregator()) { | 183 if (HpackHuffmanAggregator::UseAggregator()) { |
| 183 huffman_aggregator_.reset(new HpackHuffmanAggregator()); | 184 huffman_aggregator_.reset(new HpackHuffmanAggregator()); |
| 184 } | 185 } |
| 186 |
| 187 http_server_properties_->SetAlternateProtocolProbabilityThreshold( |
| 188 params.alternate_protocol_probability_threshold); |
| 185 } | 189 } |
| 186 | 190 |
| 187 HttpNetworkSession::~HttpNetworkSession() { | 191 HttpNetworkSession::~HttpNetworkSession() { |
| 188 STLDeleteElements(&response_drainers_); | 192 STLDeleteElements(&response_drainers_); |
| 189 spdy_session_pool_.CloseAllSessions(); | 193 spdy_session_pool_.CloseAllSessions(); |
| 190 } | 194 } |
| 191 | 195 |
| 192 void HttpNetworkSession::AddResponseDrainer(HttpResponseBodyDrainer* drainer) { | 196 void HttpNetworkSession::AddResponseDrainer(HttpResponseBodyDrainer* drainer) { |
| 193 DCHECK(!ContainsKey(response_drainers_, drainer)); | 197 DCHECK(!ContainsKey(response_drainers_, drainer)); |
| 194 response_drainers_.insert(drainer); | 198 response_drainers_.insert(drainer); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 case WEBSOCKET_SOCKET_POOL: | 302 case WEBSOCKET_SOCKET_POOL: |
| 299 return websocket_socket_pool_manager_.get(); | 303 return websocket_socket_pool_manager_.get(); |
| 300 default: | 304 default: |
| 301 NOTREACHED(); | 305 NOTREACHED(); |
| 302 break; | 306 break; |
| 303 } | 307 } |
| 304 return NULL; | 308 return NULL; |
| 305 } | 309 } |
| 306 | 310 |
| 307 } // namespace net | 311 } // namespace net |
| OLD | NEW |