| 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_SPDY_SPDY_SESSION_H_ | 5 #ifndef NET_SPDY_SPDY_SESSION_H_ |
| 6 #define NET_SPDY_SPDY_SESSION_H_ | 6 #define NET_SPDY_SPDY_SESSION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <deque> | 11 #include <deque> |
| 12 #include <map> | 12 #include <map> |
| 13 #include <set> | 13 #include <set> |
| 14 #include <string> | 14 #include <string> |
| 15 | 15 |
| 16 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| 20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
| 21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 22 #include "net/base/host_port_pair.h" |
| 22 #include "net/base/io_buffer.h" | 23 #include "net/base/io_buffer.h" |
| 23 #include "net/base/load_states.h" | 24 #include "net/base/load_states.h" |
| 24 #include "net/base/net_errors.h" | 25 #include "net/base/net_errors.h" |
| 25 #include "net/base/net_export.h" | 26 #include "net/base/net_export.h" |
| 26 #include "net/base/request_priority.h" | 27 #include "net/base/request_priority.h" |
| 27 #include "net/socket/client_socket_handle.h" | 28 #include "net/socket/client_socket_handle.h" |
| 28 #include "net/socket/client_socket_pool.h" | 29 #include "net/socket/client_socket_pool.h" |
| 29 #include "net/socket/next_proto.h" | 30 #include "net/socket/next_proto.h" |
| 30 #include "net/socket/ssl_client_socket.h" | 31 #include "net/socket/ssl_client_socket.h" |
| 31 #include "net/socket/stream_socket.h" | 32 #include "net/socket/stream_socket.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // First and last valid stream IDs. As we always act as the client, | 70 // First and last valid stream IDs. As we always act as the client, |
| 70 // start at 1 for the first stream id. | 71 // start at 1 for the first stream id. |
| 71 const SpdyStreamId kFirstStreamId = 1; | 72 const SpdyStreamId kFirstStreamId = 1; |
| 72 const SpdyStreamId kLastStreamId = 0x7fffffff; | 73 const SpdyStreamId kLastStreamId = 0x7fffffff; |
| 73 | 74 |
| 74 class BoundNetLog; | 75 class BoundNetLog; |
| 75 struct LoadTimingInfo; | 76 struct LoadTimingInfo; |
| 76 class SpdyStream; | 77 class SpdyStream; |
| 77 class SSLInfo; | 78 class SSLInfo; |
| 78 class TransportSecurityState; | 79 class TransportSecurityState; |
| 80 class TrustedSpdyProxyProvider; |
| 79 | 81 |
| 80 // NOTE: There's an enum of the same name (also with numeric suffixes) | 82 // NOTE: There's an enum of the same name (also with numeric suffixes) |
| 81 // in histograms.xml. Be sure to add new values there also. | 83 // in histograms.xml. Be sure to add new values there also. |
| 82 enum SpdyProtocolErrorDetails { | 84 enum SpdyProtocolErrorDetails { |
| 83 // SpdyFramer::SpdyError mappings. | 85 // SpdyFramer::SpdyError mappings. |
| 84 SPDY_ERROR_NO_ERROR = 0, | 86 SPDY_ERROR_NO_ERROR = 0, |
| 85 SPDY_ERROR_INVALID_CONTROL_FRAME = 1, | 87 SPDY_ERROR_INVALID_CONTROL_FRAME = 1, |
| 86 SPDY_ERROR_CONTROL_PAYLOAD_TOO_LARGE = 2, | 88 SPDY_ERROR_CONTROL_PAYLOAD_TOO_LARGE = 2, |
| 87 SPDY_ERROR_ZLIB_INIT_FAILURE = 3, | 89 SPDY_ERROR_ZLIB_INIT_FAILURE = 3, |
| 88 SPDY_ERROR_UNSUPPORTED_VERSION = 4, | 90 SPDY_ERROR_UNSUPPORTED_VERSION = 4, |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 TransportSecurityState* transport_security_state, | 247 TransportSecurityState* transport_security_state, |
| 246 bool verify_domain_authentication, | 248 bool verify_domain_authentication, |
| 247 bool enable_sending_initial_data, | 249 bool enable_sending_initial_data, |
| 248 bool enable_compression, | 250 bool enable_compression, |
| 249 bool enable_ping_based_connection_checking, | 251 bool enable_ping_based_connection_checking, |
| 250 NextProto default_protocol, | 252 NextProto default_protocol, |
| 251 size_t session_max_recv_window_size, | 253 size_t session_max_recv_window_size, |
| 252 size_t stream_max_recv_window_size, | 254 size_t stream_max_recv_window_size, |
| 253 size_t initial_max_concurrent_streams, | 255 size_t initial_max_concurrent_streams, |
| 254 TimeFunc time_func, | 256 TimeFunc time_func, |
| 255 const HostPortPair& trusted_spdy_proxy, | 257 const base::WeakPtr<TrustedSpdyProxyProvider>& |
| 258 trusted_spdy_proxy_provider, |
| 256 NetLog* net_log); | 259 NetLog* net_log); |
| 257 | 260 |
| 258 ~SpdySession() override; | 261 ~SpdySession() override; |
| 259 | 262 |
| 260 const HostPortPair& host_port_pair() const { | 263 const HostPortPair& host_port_pair() const { |
| 261 return spdy_session_key_.host_port_proxy_pair().first; | 264 return spdy_session_key_.host_port_proxy_pair().first; |
| 262 } | 265 } |
| 263 const HostPortProxyPair& host_port_proxy_pair() const { | 266 const HostPortProxyPair& host_port_proxy_pair() const { |
| 264 return spdy_session_key_.host_port_proxy_pair(); | 267 return spdy_session_key_.host_port_proxy_pair(); |
| 265 } | 268 } |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 // Used for posting asynchronous IO tasks. We use this even though | 1217 // Used for posting asynchronous IO tasks. We use this even though |
| 1215 // SpdySession is refcounted because we don't need to keep the SpdySession | 1218 // SpdySession is refcounted because we don't need to keep the SpdySession |
| 1216 // alive if the last reference is within a RunnableMethod. Just revoke the | 1219 // alive if the last reference is within a RunnableMethod. Just revoke the |
| 1217 // method. | 1220 // method. |
| 1218 base::WeakPtrFactory<SpdySession> weak_factory_; | 1221 base::WeakPtrFactory<SpdySession> weak_factory_; |
| 1219 }; | 1222 }; |
| 1220 | 1223 |
| 1221 } // namespace net | 1224 } // namespace net |
| 1222 | 1225 |
| 1223 #endif // NET_SPDY_SPDY_SESSION_H_ | 1226 #endif // NET_SPDY_SPDY_SESSION_H_ |
| OLD | NEW |