OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/logging.h" | 10 #include "base/logging.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 DCHECK(!ContainsKey(response_drainers_, drainer)); | 56 DCHECK(!ContainsKey(response_drainers_, drainer)); |
57 response_drainers_.insert(drainer); | 57 response_drainers_.insert(drainer); |
58 } | 58 } |
59 | 59 |
60 void HttpNetworkSession::RemoveResponseDrainer( | 60 void HttpNetworkSession::RemoveResponseDrainer( |
61 HttpResponseBodyDrainer* drainer) { | 61 HttpResponseBodyDrainer* drainer) { |
62 DCHECK(ContainsKey(response_drainers_, drainer)); | 62 DCHECK(ContainsKey(response_drainers_, drainer)); |
63 response_drainers_.erase(drainer); | 63 response_drainers_.erase(drainer); |
64 } | 64 } |
65 | 65 |
| 66 SOCKSClientSocketPool* HttpNetworkSession::GetSocketPoolForSOCKSProxy( |
| 67 const HostPortPair& socks_proxy) { |
| 68 return socket_pool_manager_.GetSocketPoolForSOCKSProxy(socks_proxy); |
| 69 } |
| 70 |
| 71 HttpProxyClientSocketPool* HttpNetworkSession::GetSocketPoolForHTTPProxy( |
| 72 const HostPortPair& http_proxy) { |
| 73 return socket_pool_manager_.GetSocketPoolForHTTPProxy(http_proxy); |
| 74 } |
| 75 |
| 76 SSLClientSocketPool* HttpNetworkSession::GetSocketPoolForSSLWithProxy( |
| 77 const HostPortPair& proxy_server) { |
| 78 return socket_pool_manager_.GetSocketPoolForSSLWithProxy(proxy_server); |
| 79 } |
| 80 |
| 81 Value* HttpNetworkSession::SocketPoolInfoToValue() const { |
| 82 return socket_pool_manager_.SocketPoolInfoToValue(); |
| 83 } |
| 84 |
66 Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { | 85 Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { |
67 return spdy_session_pool_.SpdySessionPoolInfoToValue(); | 86 return spdy_session_pool_.SpdySessionPoolInfoToValue(); |
68 } | 87 } |
69 | 88 |
| 89 void HttpNetworkSession::CloseAllConnections() { |
| 90 socket_pool_manager_.FlushSocketPools(); |
| 91 spdy_session_pool_.CloseCurrentSessions(); |
| 92 } |
| 93 |
| 94 void HttpNetworkSession::CloseIdleConnections() { |
| 95 socket_pool_manager_.CloseIdleSockets(); |
| 96 } |
| 97 |
70 } // namespace net | 98 } // namespace net |
OLD | NEW |