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 #include <vector> |
15 | 16 |
16 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
17 #include "base/macros.h" | 18 #include "base/macros.h" |
18 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
19 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
20 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
21 #include "base/time/time.h" | 22 #include "base/time/time.h" |
22 #include "net/base/host_port_pair.h" | 23 #include "net/base/host_port_pair.h" |
23 #include "net/base/io_buffer.h" | 24 #include "net/base/io_buffer.h" |
24 #include "net/base/load_states.h" | 25 #include "net/base/load_states.h" |
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 // making sure we don't destroy ourselves prematurely in that case. | 1009 // making sure we don't destroy ourselves prematurely in that case. |
1009 bool in_io_loop_; | 1010 bool in_io_loop_; |
1010 | 1011 |
1011 // The key used to identify this session. | 1012 // The key used to identify this session. |
1012 const SpdySessionKey spdy_session_key_; | 1013 const SpdySessionKey spdy_session_key_; |
1013 | 1014 |
1014 // Set set of SpdySessionKeys for which this session has serviced | 1015 // Set set of SpdySessionKeys for which this session has serviced |
1015 // requests. | 1016 // requests. |
1016 std::set<SpdySessionKey> pooled_aliases_; | 1017 std::set<SpdySessionKey> pooled_aliases_; |
1017 | 1018 |
1018 // |pool_| owns us, therefore its lifetime must exceed ours. We set | 1019 // |pool_| owns us, therefore its lifetime must exceed ours. |
1019 // this to NULL after we are removed from the pool. | |
1020 SpdySessionPool* pool_; | 1020 SpdySessionPool* pool_; |
1021 const base::WeakPtr<HttpServerProperties> http_server_properties_; | 1021 const base::WeakPtr<HttpServerProperties> http_server_properties_; |
1022 | 1022 |
1023 TransportSecurityState* transport_security_state_; | 1023 TransportSecurityState* transport_security_state_; |
1024 | 1024 |
1025 // The socket handle for this session. | 1025 // The socket handle for this session. |
1026 scoped_ptr<ClientSocketHandle> connection_; | 1026 scoped_ptr<ClientSocketHandle> connection_; |
1027 | 1027 |
1028 // The read buffer used to read data from the socket. | 1028 // The read buffer used to read data from the socket. |
1029 scoped_refptr<IOBuffer> read_buffer_; | 1029 scoped_refptr<IOBuffer> read_buffer_; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 // Used for posting asynchronous IO tasks. We use this even though | 1237 // Used for posting asynchronous IO tasks. We use this even though |
1238 // SpdySession is refcounted because we don't need to keep the SpdySession | 1238 // SpdySession is refcounted because we don't need to keep the SpdySession |
1239 // alive if the last reference is within a RunnableMethod. Just revoke the | 1239 // alive if the last reference is within a RunnableMethod. Just revoke the |
1240 // method. | 1240 // method. |
1241 base::WeakPtrFactory<SpdySession> weak_factory_; | 1241 base::WeakPtrFactory<SpdySession> weak_factory_; |
1242 }; | 1242 }; |
1243 | 1243 |
1244 } // namespace net | 1244 } // namespace net |
1245 | 1245 |
1246 #endif // NET_SPDY_SPDY_SESSION_H_ | 1246 #endif // NET_SPDY_SPDY_SESSION_H_ |
OLD | NEW |