| 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 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_H_ | 5 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_H_ |
| 6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_ | 6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 CertVerifier* cert_verifier; | 54 CertVerifier* cert_verifier; |
| 55 ServerBoundCertService* server_bound_cert_service; | 55 ServerBoundCertService* server_bound_cert_service; |
| 56 TransportSecurityState* transport_security_state; | 56 TransportSecurityState* transport_security_state; |
| 57 ProxyService* proxy_service; | 57 ProxyService* proxy_service; |
| 58 std::string ssl_session_cache_shard; | 58 std::string ssl_session_cache_shard; |
| 59 SSLConfigService* ssl_config_service; | 59 SSLConfigService* ssl_config_service; |
| 60 HttpAuthHandlerFactory* http_auth_handler_factory; | 60 HttpAuthHandlerFactory* http_auth_handler_factory; |
| 61 NetworkDelegate* network_delegate; | 61 NetworkDelegate* network_delegate; |
| 62 HttpServerProperties* http_server_properties; | 62 HttpServerProperties* http_server_properties; |
| 63 NetLog* net_log; | 63 NetLog* net_log; |
| 64 HostMappingRules* host_mapping_rules; |
| 64 bool force_http_pipelining; | 65 bool force_http_pipelining; |
| 66 bool ignore_certificate_errors; |
| 67 bool http_pipelining_enabled; |
| 68 uint16 testing_fixed_http_port; |
| 69 uint16 testing_fixed_https_port; |
| 65 std::string trusted_spdy_proxy; | 70 std::string trusted_spdy_proxy; |
| 66 }; | 71 }; |
| 67 | 72 |
| 68 enum SocketPoolType { | 73 enum SocketPoolType { |
| 69 NORMAL_SOCKET_POOL, | 74 NORMAL_SOCKET_POOL, |
| 70 WEBSOCKET_SOCKET_POOL, | 75 WEBSOCKET_SOCKET_POOL, |
| 71 NUM_SOCKET_POOL_TYPES | 76 NUM_SOCKET_POOL_TYPES |
| 72 }; | 77 }; |
| 73 | 78 |
| 74 explicit HttpNetworkSession(const Params& params); | 79 explicit HttpNetworkSession(const Params& params); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 base::Value* SpdySessionPoolInfoToValue() const; | 128 base::Value* SpdySessionPoolInfoToValue() const; |
| 124 | 129 |
| 125 void CloseAllConnections(); | 130 void CloseAllConnections(); |
| 126 void CloseIdleConnections(); | 131 void CloseIdleConnections(); |
| 127 | 132 |
| 128 bool force_http_pipelining() const { return force_http_pipelining_; } | 133 bool force_http_pipelining() const { return force_http_pipelining_; } |
| 129 | 134 |
| 130 // Returns the original Params used to construct this session. | 135 // Returns the original Params used to construct this session. |
| 131 const Params& params() const { return params_; } | 136 const Params& params() const { return params_; } |
| 132 | 137 |
| 138 void set_http_pipelining_enabled(bool enable) { |
| 139 params_.http_pipelining_enabled = enable; |
| 140 } |
| 141 |
| 133 private: | 142 private: |
| 134 friend class base::RefCounted<HttpNetworkSession>; | 143 friend class base::RefCounted<HttpNetworkSession>; |
| 135 friend class HttpNetworkSessionPeer; | 144 friend class HttpNetworkSessionPeer; |
| 136 | 145 |
| 137 ~HttpNetworkSession(); | 146 ~HttpNetworkSession(); |
| 138 | 147 |
| 139 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); | 148 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); |
| 140 | 149 |
| 141 NetLog* const net_log_; | 150 NetLog* const net_log_; |
| 142 NetworkDelegate* const network_delegate_; | 151 NetworkDelegate* const network_delegate_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 156 SpdySessionPool spdy_session_pool_; | 165 SpdySessionPool spdy_session_pool_; |
| 157 scoped_ptr<HttpStreamFactory> http_stream_factory_; | 166 scoped_ptr<HttpStreamFactory> http_stream_factory_; |
| 158 std::set<HttpResponseBodyDrainer*> response_drainers_; | 167 std::set<HttpResponseBodyDrainer*> response_drainers_; |
| 159 | 168 |
| 160 Params params_; | 169 Params params_; |
| 161 }; | 170 }; |
| 162 | 171 |
| 163 } // namespace net | 172 } // namespace net |
| 164 | 173 |
| 165 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ | 174 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ |
| OLD | NEW |