| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <unordered_set> | 13 #include <unordered_set> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
| 19 #include "net/base/host_port_pair.h" | 19 #include "net/base/host_port_pair.h" |
| 20 #include "net/base/net_error_details.h" |
| 20 #include "net/base/net_export.h" | 21 #include "net/base/net_export.h" |
| 21 #include "net/dns/host_resolver.h" | 22 #include "net/dns/host_resolver.h" |
| 22 #include "net/http/http_auth_cache.h" | 23 #include "net/http/http_auth_cache.h" |
| 23 #include "net/http/http_stream_factory.h" | 24 #include "net/http/http_stream_factory.h" |
| 24 #include "net/quic/quic_stream_factory.h" | 25 #include "net/quic/quic_stream_factory.h" |
| 25 #include "net/socket/next_proto.h" | 26 #include "net/socket/next_proto.h" |
| 26 #include "net/spdy/spdy_session_pool.h" | 27 #include "net/spdy/spdy_session_pool.h" |
| 27 #include "net/ssl/ssl_client_auth_cache.h" | 28 #include "net/ssl/ssl_client_auth_cache.h" |
| 28 | 29 |
| 29 namespace base { | 30 namespace base { |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 const Params& params() const { return params_; } | 262 const Params& params() const { return params_; } |
| 262 | 263 |
| 263 bool IsProtocolEnabled(AlternateProtocol protocol) const; | 264 bool IsProtocolEnabled(AlternateProtocol protocol) const; |
| 264 | 265 |
| 265 // Populates |*alpn_protos| with protocols to be used with ALPN. | 266 // Populates |*alpn_protos| with protocols to be used with ALPN. |
| 266 void GetAlpnProtos(NextProtoVector* alpn_protos) const; | 267 void GetAlpnProtos(NextProtoVector* alpn_protos) const; |
| 267 | 268 |
| 268 // Populates |*npn_protos| with protocols to be used with NPN. | 269 // Populates |*npn_protos| with protocols to be used with NPN. |
| 269 void GetNpnProtos(NextProtoVector* npn_protos) const; | 270 void GetNpnProtos(NextProtoVector* npn_protos) const; |
| 270 | 271 |
| 272 void PopulateNetErrorDetails(NetErrorDetails* details); |
| 273 |
| 271 private: | 274 private: |
| 272 friend class HttpNetworkSessionPeer; | 275 friend class HttpNetworkSessionPeer; |
| 273 | 276 |
| 274 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); | 277 ClientSocketPoolManager* GetSocketPoolManager(SocketPoolType pool_type); |
| 275 | 278 |
| 276 NetLog* const net_log_; | 279 NetLog* const net_log_; |
| 277 NetworkDelegate* const network_delegate_; | 280 NetworkDelegate* const network_delegate_; |
| 278 const base::WeakPtr<HttpServerProperties> http_server_properties_; | 281 const base::WeakPtr<HttpServerProperties> http_server_properties_; |
| 279 CertVerifier* const cert_verifier_; | 282 CertVerifier* const cert_verifier_; |
| 280 HttpAuthHandlerFactory* const http_auth_handler_factory_; | 283 HttpAuthHandlerFactory* const http_auth_handler_factory_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 295 | 298 |
| 296 NextProtoVector next_protos_; | 299 NextProtoVector next_protos_; |
| 297 bool enabled_protocols_[NUM_VALID_ALTERNATE_PROTOCOLS]; | 300 bool enabled_protocols_[NUM_VALID_ALTERNATE_PROTOCOLS]; |
| 298 | 301 |
| 299 Params params_; | 302 Params params_; |
| 300 }; | 303 }; |
| 301 | 304 |
| 302 } // namespace net | 305 } // namespace net |
| 303 | 306 |
| 304 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ | 307 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ |
| OLD | NEW |