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 #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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
11 #include "base/threading/non_thread_safe.h" | 11 #include "base/threading/non_thread_safe.h" |
12 #include "net/base/host_port_pair.h" | 12 #include "net/base/host_port_pair.h" |
13 #include "net/base/host_resolver.h" | 13 #include "net/base/host_resolver.h" |
14 #include "net/base/ssl_client_auth_cache.h" | 14 #include "net/base/ssl_client_auth_cache.h" |
| 15 #include "net/base/tls_client_login_cache.h" |
15 #include "net/http/http_alternate_protocols.h" | 16 #include "net/http/http_alternate_protocols.h" |
16 #include "net/http/http_auth_cache.h" | 17 #include "net/http/http_auth_cache.h" |
17 #include "net/http/http_stream_factory.h" | 18 #include "net/http/http_stream_factory.h" |
18 #include "net/socket/client_socket_pool_manager.h" | 19 #include "net/socket/client_socket_pool_manager.h" |
19 #include "net/spdy/spdy_session_pool.h" | 20 #include "net/spdy/spdy_session_pool.h" |
20 #include "net/spdy/spdy_settings_storage.h" | 21 #include "net/spdy/spdy_settings_storage.h" |
21 | 22 |
22 class Value; | 23 class Value; |
23 | 24 |
24 namespace net { | 25 namespace net { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 HttpNetworkDelegate* network_delegate; | 69 HttpNetworkDelegate* network_delegate; |
69 NetLog* net_log; | 70 NetLog* net_log; |
70 }; | 71 }; |
71 | 72 |
72 explicit HttpNetworkSession(const Params& params); | 73 explicit HttpNetworkSession(const Params& params); |
73 | 74 |
74 HttpAuthCache* auth_cache() { return &auth_cache_; } | 75 HttpAuthCache* auth_cache() { return &auth_cache_; } |
75 SSLClientAuthCache* ssl_client_auth_cache() { | 76 SSLClientAuthCache* ssl_client_auth_cache() { |
76 return &ssl_client_auth_cache_; | 77 return &ssl_client_auth_cache_; |
77 } | 78 } |
| 79 TLSClientLoginCache* tls_client_login_cache() { |
| 80 return &tls_client_login_cache_; |
| 81 } |
78 | 82 |
79 void AddResponseDrainer(HttpResponseBodyDrainer* drainer); | 83 void AddResponseDrainer(HttpResponseBodyDrainer* drainer); |
80 | 84 |
81 void RemoveResponseDrainer(HttpResponseBodyDrainer* drainer); | 85 void RemoveResponseDrainer(HttpResponseBodyDrainer* drainer); |
82 | 86 |
83 const HttpAlternateProtocols& alternate_protocols() const { | 87 const HttpAlternateProtocols& alternate_protocols() const { |
84 return alternate_protocols_; | 88 return alternate_protocols_; |
85 } | 89 } |
86 HttpAlternateProtocols* mutable_alternate_protocols() { | 90 HttpAlternateProtocols* mutable_alternate_protocols() { |
87 return &alternate_protocols_; | 91 return &alternate_protocols_; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 } | 156 } |
153 | 157 |
154 private: | 158 private: |
155 friend class base::RefCounted<HttpNetworkSession>; | 159 friend class base::RefCounted<HttpNetworkSession>; |
156 friend class HttpNetworkSessionPeer; | 160 friend class HttpNetworkSessionPeer; |
157 | 161 |
158 ~HttpNetworkSession(); | 162 ~HttpNetworkSession(); |
159 | 163 |
160 HttpAuthCache auth_cache_; | 164 HttpAuthCache auth_cache_; |
161 SSLClientAuthCache ssl_client_auth_cache_; | 165 SSLClientAuthCache ssl_client_auth_cache_; |
| 166 TLSClientLoginCache tls_client_login_cache_; |
162 HttpAlternateProtocols alternate_protocols_; | 167 HttpAlternateProtocols alternate_protocols_; |
163 CertVerifier* cert_verifier_; | 168 CertVerifier* cert_verifier_; |
164 // Not const since it's modified by HttpNetworkSessionPeer for testing. | 169 // Not const since it's modified by HttpNetworkSessionPeer for testing. |
165 scoped_refptr<ProxyService> proxy_service_; | 170 scoped_refptr<ProxyService> proxy_service_; |
166 const scoped_refptr<SSLConfigService> ssl_config_service_; | 171 const scoped_refptr<SSLConfigService> ssl_config_service_; |
167 ClientSocketPoolManager socket_pool_manager_; | 172 ClientSocketPoolManager socket_pool_manager_; |
168 SpdySessionPool spdy_session_pool_; | 173 SpdySessionPool spdy_session_pool_; |
169 HttpStreamFactory http_stream_factory_; | 174 HttpStreamFactory http_stream_factory_; |
170 HttpAuthHandlerFactory* const http_auth_handler_factory_; | 175 HttpAuthHandlerFactory* const http_auth_handler_factory_; |
171 HttpNetworkDelegate* const network_delegate_; | 176 HttpNetworkDelegate* const network_delegate_; |
172 NetLog* const net_log_; | 177 NetLog* const net_log_; |
173 SpdySettingsStorage spdy_settings_; | 178 SpdySettingsStorage spdy_settings_; |
174 std::set<HttpResponseBodyDrainer*> response_drainers_; | 179 std::set<HttpResponseBodyDrainer*> response_drainers_; |
175 }; | 180 }; |
176 | 181 |
177 } // namespace net | 182 } // namespace net |
178 | 183 |
179 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ | 184 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ |
OLD | NEW |