| 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 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "net/spdy/http2_priority_dependencies.h" | 35 #include "net/spdy/http2_priority_dependencies.h" |
| 36 #include "net/spdy/spdy_buffer.h" | 36 #include "net/spdy/spdy_buffer.h" |
| 37 #include "net/spdy/spdy_framer.h" | 37 #include "net/spdy/spdy_framer.h" |
| 38 #include "net/spdy/spdy_header_block.h" | 38 #include "net/spdy/spdy_header_block.h" |
| 39 #include "net/spdy/spdy_protocol.h" | 39 #include "net/spdy/spdy_protocol.h" |
| 40 #include "net/spdy/spdy_session_pool.h" | 40 #include "net/spdy/spdy_session_pool.h" |
| 41 #include "net/spdy/spdy_stream.h" | 41 #include "net/spdy/spdy_stream.h" |
| 42 #include "net/spdy/spdy_write_queue.h" | 42 #include "net/spdy/spdy_write_queue.h" |
| 43 #include "net/ssl/ssl_config_service.h" | 43 #include "net/ssl/ssl_config_service.h" |
| 44 #include "url/gurl.h" | 44 #include "url/gurl.h" |
| 45 #include "url/scheme_host_port.h" |
| 45 | 46 |
| 46 namespace net { | 47 namespace net { |
| 47 | 48 |
| 48 namespace test { | 49 namespace test { |
| 49 class SpdyStreamTest; | 50 class SpdyStreamTest; |
| 50 } | 51 } |
| 51 | 52 |
| 52 // This is somewhat arbitrary and not really fixed, but it will always work | 53 // This is somewhat arbitrary and not really fixed, but it will always work |
| 53 // reasonably with ethernet. Chop the world into 2-packet chunks. This is | 54 // reasonably with ethernet. Chop the world into 2-packet chunks. This is |
| 54 // somewhat arbitrary, but is reasonably small and ensures that we elicit | 55 // somewhat arbitrary, but is reasonably small and ensures that we elicit |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 SpdyRstStreamStatus status, | 400 SpdyRstStreamStatus status, |
| 400 const std::string& description); | 401 const std::string& description); |
| 401 | 402 |
| 402 // Check if a stream is active. | 403 // Check if a stream is active. |
| 403 bool IsStreamActive(SpdyStreamId stream_id) const; | 404 bool IsStreamActive(SpdyStreamId stream_id) const; |
| 404 | 405 |
| 405 // The LoadState is used for informing the user of the current network | 406 // The LoadState is used for informing the user of the current network |
| 406 // status, such as "resolving host", "connecting", etc. | 407 // status, such as "resolving host", "connecting", etc. |
| 407 LoadState GetLoadState() const; | 408 LoadState GetLoadState() const; |
| 408 | 409 |
| 410 // Returns server infomation in the form of (scheme/host/port). |
| 411 url::SchemeHostPort GetServer(); |
| 412 |
| 409 // Fills SSL info in |ssl_info| and returns true when SSL is in use. | 413 // Fills SSL info in |ssl_info| and returns true when SSL is in use. |
| 410 bool GetSSLInfo(SSLInfo* ssl_info, | 414 bool GetSSLInfo(SSLInfo* ssl_info, |
| 411 bool* was_npn_negotiated, | 415 bool* was_npn_negotiated, |
| 412 NextProto* protocol_negotiated); | 416 NextProto* protocol_negotiated); |
| 413 | 417 |
| 414 // Signs the EKM value for Token Binding from the TLS layer using |*key| and | 418 // Signs the EKM value for Token Binding from the TLS layer using |*key| and |
| 415 // puts the result in |*out|. Returns OK or ERR_FAILED. | 419 // puts the result in |*out|. Returns OK or ERR_FAILED. |
| 416 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | 420 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
| 417 std::vector<uint8_t>* out); | 421 std::vector<uint8_t>* out); |
| 418 | 422 |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 // Used for posting asynchronous IO tasks. We use this even though | 1233 // Used for posting asynchronous IO tasks. We use this even though |
| 1230 // SpdySession is refcounted because we don't need to keep the SpdySession | 1234 // SpdySession is refcounted because we don't need to keep the SpdySession |
| 1231 // alive if the last reference is within a RunnableMethod. Just revoke the | 1235 // alive if the last reference is within a RunnableMethod. Just revoke the |
| 1232 // method. | 1236 // method. |
| 1233 base::WeakPtrFactory<SpdySession> weak_factory_; | 1237 base::WeakPtrFactory<SpdySession> weak_factory_; |
| 1234 }; | 1238 }; |
| 1235 | 1239 |
| 1236 } // namespace net | 1240 } // namespace net |
| 1237 | 1241 |
| 1238 #endif // NET_SPDY_SPDY_SESSION_H_ | 1242 #endif // NET_SPDY_SPDY_SESSION_H_ |
| OLD | NEW |