OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_QUIC_QUIC_CLIENT_SESSION_BASE_H_ | 5 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ |
6 #define NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ | 6 #define NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 virtual void DeletePromised(QuicClientPromisedInfo* promised); | 104 virtual void DeletePromised(QuicClientPromisedInfo* promised); |
105 | 105 |
106 virtual void OnPushStreamTimedOut(QuicStreamId stream_id); | 106 virtual void OnPushStreamTimedOut(QuicStreamId stream_id); |
107 | 107 |
108 // Sends Rst for the stream, and makes sure that future calls to | 108 // Sends Rst for the stream, and makes sure that future calls to |
109 // IsClosedStream(id) return true, which ensures that any subsequent | 109 // IsClosedStream(id) return true, which ensures that any subsequent |
110 // frames related to this stream will be ignored (modulo flow | 110 // frames related to this stream will be ignored (modulo flow |
111 // control accounting). | 111 // control accounting). |
112 void ResetPromised(QuicStreamId id, QuicRstStreamErrorCode error_code); | 112 void ResetPromised(QuicStreamId id, QuicRstStreamErrorCode error_code); |
113 | 113 |
114 // Cancels the push if the push stream is unclaimed and active. | |
115 virtual void CancelPush(const GURL& url); | |
Ryan Hamilton
2016/10/27 17:00:25
I don't think I understand why we need this method
Zhongyi Shi
2016/10/27 17:57:30
You are right. I don't need this anymore. I was th
| |
116 | |
114 // Release headers stream's sequencer buffer if it's empty. | 117 // Release headers stream's sequencer buffer if it's empty. |
115 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset) override; | 118 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset) override; |
116 | 119 |
117 // Returns true if there are no active requests and no promised streams. | 120 // Returns true if there are no active requests and no promised streams. |
118 bool ShouldReleaseHeadersStreamSequencerBuffer() override; | 121 bool ShouldReleaseHeadersStreamSequencerBuffer() override; |
119 | 122 |
120 size_t get_max_promises() const { | 123 size_t get_max_promises() const { |
121 return max_open_incoming_streams() * kMaxPromisedStreamsMultiplier; | 124 return max_open_incoming_streams() * kMaxPromisedStreamsMultiplier; |
122 } | 125 } |
123 | 126 |
(...skipping 15 matching lines...) Expand all Loading... | |
139 QuicClientPushPromiseIndex* push_promise_index_; | 142 QuicClientPushPromiseIndex* push_promise_index_; |
140 QuicPromisedByIdMap promised_by_id_; | 143 QuicPromisedByIdMap promised_by_id_; |
141 QuicStreamId largest_promised_stream_id_; | 144 QuicStreamId largest_promised_stream_id_; |
142 | 145 |
143 DISALLOW_COPY_AND_ASSIGN(QuicClientSessionBase); | 146 DISALLOW_COPY_AND_ASSIGN(QuicClientSessionBase); |
144 }; | 147 }; |
145 | 148 |
146 } // namespace net | 149 } // namespace net |
147 | 150 |
148 #endif // NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ | 151 #endif // NET_QUIC_QUIC_CLIENT_SESSION_BASE_H_ |
OLD | NEW |