Chromium Code Reviews| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 396 SpdyRstStreamStatus status, | 397 SpdyRstStreamStatus status, |
| 397 const std::string& description); | 398 const std::string& description); |
| 398 | 399 |
| 399 // Check if a stream is active. | 400 // Check if a stream is active. |
| 400 bool IsStreamActive(SpdyStreamId stream_id) const; | 401 bool IsStreamActive(SpdyStreamId stream_id) const; |
| 401 | 402 |
| 402 // The LoadState is used for informing the user of the current network | 403 // The LoadState is used for informing the user of the current network |
| 403 // status, such as "resolving host", "connecting", etc. | 404 // status, such as "resolving host", "connecting", etc. |
| 404 LoadState GetLoadState() const; | 405 LoadState GetLoadState() const; |
| 405 | 406 |
| 407 url::SchemeHostPort GetSpdyServer(); | |
|
Ryan Hamilton
2016/04/08 18:38:05
nit: No need for Spdy in this method name. Can you
Zhongyi Shi
2016/04/12 21:08:08
Done.
| |
| 408 | |
| 406 // Fills SSL info in |ssl_info| and returns true when SSL is in use. | 409 // Fills SSL info in |ssl_info| and returns true when SSL is in use. |
| 407 bool GetSSLInfo(SSLInfo* ssl_info, | 410 bool GetSSLInfo(SSLInfo* ssl_info, |
| 408 bool* was_npn_negotiated, | 411 bool* was_npn_negotiated, |
| 409 NextProto* protocol_negotiated); | 412 NextProto* protocol_negotiated); |
| 410 | 413 |
| 411 // Signs the EKM value for Token Binding from the TLS layer using |*key| and | 414 // Signs the EKM value for Token Binding from the TLS layer using |*key| and |
| 412 // puts the result in |*out|. Returns OK or ERR_FAILED. | 415 // puts the result in |*out|. Returns OK or ERR_FAILED. |
| 413 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | 416 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
| 414 std::vector<uint8_t>* out); | 417 std::vector<uint8_t>* out); |
| 415 | 418 |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1226 // Used for posting asynchronous IO tasks. We use this even though | 1229 // Used for posting asynchronous IO tasks. We use this even though |
| 1227 // SpdySession is refcounted because we don't need to keep the SpdySession | 1230 // SpdySession is refcounted because we don't need to keep the SpdySession |
| 1228 // alive if the last reference is within a RunnableMethod. Just revoke the | 1231 // alive if the last reference is within a RunnableMethod. Just revoke the |
| 1229 // method. | 1232 // method. |
| 1230 base::WeakPtrFactory<SpdySession> weak_factory_; | 1233 base::WeakPtrFactory<SpdySession> weak_factory_; |
| 1231 }; | 1234 }; |
| 1232 | 1235 |
| 1233 } // namespace net | 1236 } // namespace net |
| 1234 | 1237 |
| 1235 #endif // NET_SPDY_SPDY_SESSION_H_ | 1238 #endif // NET_SPDY_SPDY_SESSION_H_ |
| OLD | NEW |