| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "net/http/http_auth_handler_factory.h" | 13 #include "net/http/http_auth_handler_factory.h" |
| 14 #include "net/http/http_response_body_drainer.h" | 14 #include "net/http/http_response_body_drainer.h" |
| 15 #include "net/http/url_security_manager.h" | 15 #include "net/http/url_security_manager.h" |
| 16 #include "net/spdy/spdy_session_pool.h" | 16 #include "net/spdy/spdy_session_pool.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 // TODO(mbelshe): Move the socket factories into HttpStreamFactory. | 20 // TODO(mbelshe): Move the socket factories into HttpStreamFactory. |
| 21 HttpNetworkSession::HttpNetworkSession( | 21 HttpNetworkSession::HttpNetworkSession( |
| 22 HostResolver* host_resolver, | 22 HostResolver* host_resolver, |
| 23 DnsRRResolver* dnsrr_resolver, | 23 DnsRRResolver* dnsrr_resolver, |
| 24 SSLHostInfoFactory* ssl_host_info_factory, |
| 24 ProxyService* proxy_service, | 25 ProxyService* proxy_service, |
| 25 ClientSocketFactory* client_socket_factory, | 26 ClientSocketFactory* client_socket_factory, |
| 26 SSLConfigService* ssl_config_service, | 27 SSLConfigService* ssl_config_service, |
| 27 SpdySessionPool* spdy_session_pool, | 28 SpdySessionPool* spdy_session_pool, |
| 28 HttpAuthHandlerFactory* http_auth_handler_factory, | 29 HttpAuthHandlerFactory* http_auth_handler_factory, |
| 29 HttpNetworkDelegate* network_delegate, | 30 HttpNetworkDelegate* network_delegate, |
| 30 NetLog* net_log) | 31 NetLog* net_log) |
| 31 : socket_factory_(client_socket_factory), | 32 : socket_factory_(client_socket_factory), |
| 32 host_resolver_(host_resolver), | 33 host_resolver_(host_resolver), |
| 33 dnsrr_resolver_(dnsrr_resolver), | 34 dnsrr_resolver_(dnsrr_resolver), |
| 34 proxy_service_(proxy_service), | 35 proxy_service_(proxy_service), |
| 35 ssl_config_service_(ssl_config_service), | 36 ssl_config_service_(ssl_config_service), |
| 36 socket_pool_manager_(net_log, | 37 socket_pool_manager_(net_log, |
| 37 client_socket_factory, | 38 client_socket_factory, |
| 38 host_resolver, | 39 host_resolver, |
| 39 dnsrr_resolver, | 40 dnsrr_resolver, |
| 41 ssl_host_info_factory, |
| 40 proxy_service, | 42 proxy_service, |
| 41 ssl_config_service), | 43 ssl_config_service), |
| 42 spdy_session_pool_(spdy_session_pool), | 44 spdy_session_pool_(spdy_session_pool), |
| 43 http_stream_factory_(new HttpStreamFactory()), | 45 http_stream_factory_(new HttpStreamFactory()), |
| 44 http_auth_handler_factory_(http_auth_handler_factory), | 46 http_auth_handler_factory_(http_auth_handler_factory), |
| 45 network_delegate_(network_delegate), | 47 network_delegate_(network_delegate), |
| 46 net_log_(net_log) { | 48 net_log_(net_log) { |
| 47 DCHECK(proxy_service); | 49 DCHECK(proxy_service); |
| 48 DCHECK(ssl_config_service); | 50 DCHECK(ssl_config_service); |
| 49 } | 51 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 62 HttpResponseBodyDrainer* drainer) { | 64 HttpResponseBodyDrainer* drainer) { |
| 63 DCHECK(ContainsKey(response_drainers_, drainer)); | 65 DCHECK(ContainsKey(response_drainers_, drainer)); |
| 64 response_drainers_.erase(drainer); | 66 response_drainers_.erase(drainer); |
| 65 } | 67 } |
| 66 | 68 |
| 67 Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { | 69 Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { |
| 68 return spdy_session_pool_->SpdySessionPoolInfoToValue(); | 70 return spdy_session_pool_->SpdySessionPoolInfoToValue(); |
| 69 } | 71 } |
| 70 | 72 |
| 71 } // namespace net | 73 } // namespace net |
| OLD | NEW |