| 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" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/rand_util.h" |
| 12 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
| 13 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 14 #include "base/values.h" | 15 #include "base/values.h" |
| 15 #include "net/http/http_auth_handler_factory.h" | 16 #include "net/http/http_auth_handler_factory.h" |
| 16 #include "net/http/http_response_body_drainer.h" | 17 #include "net/http/http_response_body_drainer.h" |
| 17 #include "net/http/http_stream_factory_impl.h" | 18 #include "net/http/http_stream_factory_impl.h" |
| 18 #include "net/http/url_security_manager.h" | 19 #include "net/http/url_security_manager.h" |
| 19 #include "net/proxy/proxy_service.h" | 20 #include "net/proxy/proxy_service.h" |
| 21 #include "net/quic/quic_clock.h" |
| 22 #include "net/quic/quic_stream_factory.h" |
| 20 #include "net/socket/client_socket_factory.h" | 23 #include "net/socket/client_socket_factory.h" |
| 21 #include "net/socket/client_socket_pool_manager_impl.h" | 24 #include "net/socket/client_socket_pool_manager_impl.h" |
| 22 #include "net/socket/next_proto.h" | 25 #include "net/socket/next_proto.h" |
| 23 #include "net/spdy/spdy_session_pool.h" | 26 #include "net/spdy/spdy_session_pool.h" |
| 24 | 27 |
| 25 namespace { | 28 namespace { |
| 26 | 29 |
| 27 net::ClientSocketPoolManager* CreateSocketPoolManager( | 30 net::ClientSocketPoolManager* CreateSocketPoolManager( |
| 28 net::HttpNetworkSession::SocketPoolType pool_type, | 31 net::HttpNetworkSession::SocketPoolType pool_type, |
| 29 const net::HttpNetworkSession::Params& params) { | 32 const net::HttpNetworkSession::Params& params) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 params.enable_spdy_ip_pooling, | 104 params.enable_spdy_ip_pooling, |
| 102 params.enable_spdy_credential_frames, | 105 params.enable_spdy_credential_frames, |
| 103 params.enable_spdy_compression, | 106 params.enable_spdy_compression, |
| 104 params.enable_spdy_ping_based_connection_checking, | 107 params.enable_spdy_ping_based_connection_checking, |
| 105 params.spdy_default_protocol, | 108 params.spdy_default_protocol, |
| 106 params.spdy_initial_recv_window_size, | 109 params.spdy_initial_recv_window_size, |
| 107 params.spdy_initial_max_concurrent_streams, | 110 params.spdy_initial_max_concurrent_streams, |
| 108 params.spdy_max_concurrent_streams_limit, | 111 params.spdy_max_concurrent_streams_limit, |
| 109 params.time_func, | 112 params.time_func, |
| 110 params.trusted_spdy_proxy), | 113 params.trusted_spdy_proxy), |
| 114 quic_stream_factory_(params.host_resolver, |
| 115 net::ClientSocketFactory::GetDefaultFactory(), |
| 116 base::Bind(&base::RandUint64), |
| 117 new QuicClock()), |
| 111 ALLOW_THIS_IN_INITIALIZER_LIST(http_stream_factory_( | 118 ALLOW_THIS_IN_INITIALIZER_LIST(http_stream_factory_( |
| 112 new HttpStreamFactoryImpl(this))), | 119 new HttpStreamFactoryImpl(this))), |
| 113 params_(params) { | 120 params_(params) { |
| 114 DCHECK(proxy_service_); | 121 DCHECK(proxy_service_); |
| 115 DCHECK(ssl_config_service_); | 122 DCHECK(ssl_config_service_); |
| 116 CHECK(http_server_properties_); | 123 CHECK(http_server_properties_); |
| 117 } | 124 } |
| 118 | 125 |
| 119 HttpNetworkSession::~HttpNetworkSession() { | 126 HttpNetworkSession::~HttpNetworkSession() { |
| 120 STLDeleteElements(&response_drainers_); | 127 STLDeleteElements(&response_drainers_); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 case WEBSOCKET_SOCKET_POOL: | 198 case WEBSOCKET_SOCKET_POOL: |
| 192 return websocket_socket_pool_manager_.get(); | 199 return websocket_socket_pool_manager_.get(); |
| 193 default: | 200 default: |
| 194 NOTREACHED(); | 201 NOTREACHED(); |
| 195 break; | 202 break; |
| 196 } | 203 } |
| 197 return NULL; | 204 return NULL; |
| 198 } | 205 } |
| 199 | 206 |
| 200 } // namespace net | 207 } // namespace net |
| OLD | NEW |