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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 return GetSocketPoolManager(pool_type)->GetSocketPoolForHTTPProxy(http_proxy); | 172 return GetSocketPoolManager(pool_type)->GetSocketPoolForHTTPProxy(http_proxy); |
173 } | 173 } |
174 | 174 |
175 SSLClientSocketPool* HttpNetworkSession::GetSocketPoolForSSLWithProxy( | 175 SSLClientSocketPool* HttpNetworkSession::GetSocketPoolForSSLWithProxy( |
176 SocketPoolType pool_type, | 176 SocketPoolType pool_type, |
177 const HostPortPair& proxy_server) { | 177 const HostPortPair& proxy_server) { |
178 return GetSocketPoolManager(pool_type)->GetSocketPoolForSSLWithProxy( | 178 return GetSocketPoolManager(pool_type)->GetSocketPoolForSSLWithProxy( |
179 proxy_server); | 179 proxy_server); |
180 } | 180 } |
181 | 181 |
182 Value* HttpNetworkSession::SocketPoolInfoToValue() const { | 182 base::Value* HttpNetworkSession::SocketPoolInfoToValue() const { |
183 // TODO(yutak): Should merge values from normal pools and WebSocket pools. | 183 // TODO(yutak): Should merge values from normal pools and WebSocket pools. |
184 return normal_socket_pool_manager_->SocketPoolInfoToValue(); | 184 return normal_socket_pool_manager_->SocketPoolInfoToValue(); |
185 } | 185 } |
186 | 186 |
187 Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { | 187 base::Value* HttpNetworkSession::SpdySessionPoolInfoToValue() const { |
188 return spdy_session_pool_.SpdySessionPoolInfoToValue(); | 188 return spdy_session_pool_.SpdySessionPoolInfoToValue(); |
189 } | 189 } |
190 | 190 |
191 Value* HttpNetworkSession::QuicInfoToValue() const { | 191 base::Value* HttpNetworkSession::QuicInfoToValue() const { |
192 base::DictionaryValue* dict = new base::DictionaryValue(); | 192 base::DictionaryValue* dict = new base::DictionaryValue(); |
193 dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue()); | 193 dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue()); |
194 dict->SetBoolean("quic_enabled", params_.enable_quic); | 194 dict->SetBoolean("quic_enabled", params_.enable_quic); |
195 dict->SetString("origin_to_force_quic_on", | 195 dict->SetString("origin_to_force_quic_on", |
196 params_.origin_to_force_quic_on.ToString()); | 196 params_.origin_to_force_quic_on.ToString()); |
197 return dict; | 197 return dict; |
198 } | 198 } |
199 | 199 |
200 void HttpNetworkSession::CloseAllConnections() { | 200 void HttpNetworkSession::CloseAllConnections() { |
201 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); | 201 normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED); |
(...skipping 16 matching lines...) Expand all Loading... |
218 case WEBSOCKET_SOCKET_POOL: | 218 case WEBSOCKET_SOCKET_POOL: |
219 return websocket_socket_pool_manager_.get(); | 219 return websocket_socket_pool_manager_.get(); |
220 default: | 220 default: |
221 NOTREACHED(); | 221 NOTREACHED(); |
222 break; | 222 break; |
223 } | 223 } |
224 return NULL; | 224 return NULL; |
225 } | 225 } |
226 | 226 |
227 } // namespace net | 227 } // namespace net |
OLD | NEW |