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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 friend class SpdyNetworkTransactionTest; | 565 friend class SpdyNetworkTransactionTest; |
566 friend class SpdyProxyClientSocketTest; | 566 friend class SpdyProxyClientSocketTest; |
567 friend class SpdySessionTest; | 567 friend class SpdySessionTest; |
568 friend class SpdyStreamRequest; | 568 friend class SpdyStreamRequest; |
569 | 569 |
570 // Allow tests to access our innards for testing purposes. | 570 // Allow tests to access our innards for testing purposes. |
571 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ClientPing); | 571 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ClientPing); |
572 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, FailedPing); | 572 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, FailedPing); |
573 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, GetActivePushStream); | 573 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, GetActivePushStream); |
574 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, DeleteExpiredPushStreams); | 574 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, DeleteExpiredPushStreams); |
| 575 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, MetricsCollectionOnPushStreams); |
575 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ProtocolNegotiation); | 576 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ProtocolNegotiation); |
576 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ClearSettings); | 577 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ClearSettings); |
577 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, AdjustRecvWindowSize); | 578 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, AdjustRecvWindowSize); |
578 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, AdjustSendWindowSize); | 579 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, AdjustSendWindowSize); |
579 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlInactiveStream); | 580 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlInactiveStream); |
580 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlPadding); | 581 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, SessionFlowControlPadding); |
581 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, | 582 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, |
582 SessionFlowControlTooMuchDataTwoDataFrames); | 583 SessionFlowControlTooMuchDataTwoDataFrames); |
583 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, | 584 FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, |
584 StreamFlowControlTooMuchDataTwoDataFrames); | 585 StreamFlowControlTooMuchDataTwoDataFrames); |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 // Number of pushed streams. All active streams are stored in | 1045 // Number of pushed streams. All active streams are stored in |
1045 // |active_streams_|, but it's better to know the number of push streams | 1046 // |active_streams_|, but it's better to know the number of push streams |
1046 // without traversing the whole collection. | 1047 // without traversing the whole collection. |
1047 size_t num_pushed_streams_; | 1048 size_t num_pushed_streams_; |
1048 | 1049 |
1049 // Number of active pushed streams in |active_streams_|, i.e. not in reserved | 1050 // Number of active pushed streams in |active_streams_|, i.e. not in reserved |
1050 // remote state. Streams in reserved state are not counted towards any | 1051 // remote state. Streams in reserved state are not counted towards any |
1051 // concurrency limits. | 1052 // concurrency limits. |
1052 size_t num_active_pushed_streams_; | 1053 size_t num_active_pushed_streams_; |
1053 | 1054 |
| 1055 // Number of bytes that has been pushed by the server. |
| 1056 uint64_t bytes_pushed_count_; |
| 1057 |
| 1058 // Number of bytes that has been pushed by the server but never claimed. |
| 1059 uint64_t bytes_pushed_and_unclaimed_count_; |
| 1060 |
1054 // The write queue. | 1061 // The write queue. |
1055 SpdyWriteQueue write_queue_; | 1062 SpdyWriteQueue write_queue_; |
1056 | 1063 |
1057 // Data for the frame we are currently sending. | 1064 // Data for the frame we are currently sending. |
1058 | 1065 |
1059 // The buffer we're currently writing. | 1066 // The buffer we're currently writing. |
1060 std::unique_ptr<SpdyBuffer> in_flight_write_; | 1067 std::unique_ptr<SpdyBuffer> in_flight_write_; |
1061 // The type of the frame in |in_flight_write_|. | 1068 // The type of the frame in |in_flight_write_|. |
1062 SpdyFrameType in_flight_write_frame_type_; | 1069 SpdyFrameType in_flight_write_frame_type_; |
1063 // The size of the frame in |in_flight_write_|. | 1070 // The size of the frame in |in_flight_write_|. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 // Used for posting asynchronous IO tasks. We use this even though | 1207 // Used for posting asynchronous IO tasks. We use this even though |
1201 // SpdySession is refcounted because we don't need to keep the SpdySession | 1208 // SpdySession is refcounted because we don't need to keep the SpdySession |
1202 // alive if the last reference is within a RunnableMethod. Just revoke the | 1209 // alive if the last reference is within a RunnableMethod. Just revoke the |
1203 // method. | 1210 // method. |
1204 base::WeakPtrFactory<SpdySession> weak_factory_; | 1211 base::WeakPtrFactory<SpdySession> weak_factory_; |
1205 }; | 1212 }; |
1206 | 1213 |
1207 } // namespace net | 1214 } // namespace net |
1208 | 1215 |
1209 #endif // NET_SPDY_SPDY_SESSION_H_ | 1216 #endif // NET_SPDY_SPDY_SESSION_H_ |
OLD | NEW |