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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 357 |
358 // The LoadState is used for informing the user of the current network | 358 // The LoadState is used for informing the user of the current network |
359 // status, such as "resolving host", "connecting", etc. | 359 // status, such as "resolving host", "connecting", etc. |
360 LoadState GetLoadState() const; | 360 LoadState GetLoadState() const; |
361 | 361 |
362 // Fills SSL info in |ssl_info| and returns true when SSL is in use. | 362 // Fills SSL info in |ssl_info| and returns true when SSL is in use. |
363 bool GetSSLInfo(SSLInfo* ssl_info, | 363 bool GetSSLInfo(SSLInfo* ssl_info, |
364 bool* was_npn_negotiated, | 364 bool* was_npn_negotiated, |
365 NextProto* protocol_negotiated); | 365 NextProto* protocol_negotiated); |
366 | 366 |
| 367 // Signs the EKM value for Token Binding from the TLS layer using |*key| and |
| 368 // puts the result in |*out|. Returns OK or ERR_FAILED. |
| 369 int GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, |
| 370 std::vector<uint8_t>* out); |
| 371 |
367 // Send a WINDOW_UPDATE frame for a stream. Called by a stream | 372 // Send a WINDOW_UPDATE frame for a stream. Called by a stream |
368 // whenever receive window size is increased. | 373 // whenever receive window size is increased. |
369 void SendStreamWindowUpdate(SpdyStreamId stream_id, | 374 void SendStreamWindowUpdate(SpdyStreamId stream_id, |
370 uint32_t delta_window_size); | 375 uint32_t delta_window_size); |
371 | 376 |
372 // Accessors for the session's availability state. | 377 // Accessors for the session's availability state. |
373 bool IsAvailable() const { return availability_state_ == STATE_AVAILABLE; } | 378 bool IsAvailable() const { return availability_state_ == STATE_AVAILABLE; } |
374 bool IsGoingAway() const { return availability_state_ == STATE_GOING_AWAY; } | 379 bool IsGoingAway() const { return availability_state_ == STATE_GOING_AWAY; } |
375 bool IsDraining() const { return availability_state_ == STATE_DRAINING; } | 380 bool IsDraining() const { return availability_state_ == STATE_DRAINING; } |
376 | 381 |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 // Used for posting asynchronous IO tasks. We use this even though | 1219 // Used for posting asynchronous IO tasks. We use this even though |
1215 // SpdySession is refcounted because we don't need to keep the SpdySession | 1220 // 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 | 1221 // alive if the last reference is within a RunnableMethod. Just revoke the |
1217 // method. | 1222 // method. |
1218 base::WeakPtrFactory<SpdySession> weak_factory_; | 1223 base::WeakPtrFactory<SpdySession> weak_factory_; |
1219 }; | 1224 }; |
1220 | 1225 |
1221 } // namespace net | 1226 } // namespace net |
1222 | 1227 |
1223 #endif // NET_SPDY_SPDY_SESSION_H_ | 1228 #endif // NET_SPDY_SPDY_SESSION_H_ |
OLD | NEW |