Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: net/quic/core/quic_stream_sequencer.cc

Issue 2387753002: Release read buffer of QuicCryptoStream when incoming message become less frequent. Protected by --… (Closed)
Patch Set: enable quic crypto stream release buffer Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_stream_sequencer.h ('k') | net/quic/core/quic_stream_sequencer_buffer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_stream_sequencer.cc
diff --git a/net/quic/core/quic_stream_sequencer.cc b/net/quic/core/quic_stream_sequencer.cc
index 45f1e88ca7e4830f3c4bab0e7fc8a6b66ca8db69..597244b5436ddef4c2184922947d3699c593c89c 100644
--- a/net/quic/core/quic_stream_sequencer.cc
+++ b/net/quic/core/quic_stream_sequencer.cc
@@ -197,6 +197,12 @@ void QuicStreamSequencer::ReleaseBuffer() {
buffered_frames_.ReleaseWholeBuffer();
}
+void QuicStreamSequencer::ReleaseBufferIfEmpty() {
+ if (FLAGS_quic_release_crypto_stream_buffer && buffered_frames_.Empty()) {
+ buffered_frames_.ReleaseWholeBuffer();
+ }
+}
+
void QuicStreamSequencer::FlushBufferedFrames() {
DCHECK(ignore_read_data_);
size_t bytes_flushed = buffered_frames_.FlushBufferedFrames();
« no previous file with comments | « net/quic/core/quic_stream_sequencer.h ('k') | net/quic/core/quic_stream_sequencer_buffer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698