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

Side by Side Diff: net/quic/quic_write_blocked_list.h

Issue 1466153002: Clear the connection's send alarm when a new ack is received. Flag protected by gfe2_reloadable_fl… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107691686
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_flags.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_WRITE_BLOCKED_LIST_H_ 5 #ifndef NET_QUIC_QUIC_WRITE_BLOCKED_LIST_H_
6 #define NET_QUIC_QUIC_WRITE_BLOCKED_LIST_H_ 6 #define NET_QUIC_QUIC_WRITE_BLOCKED_LIST_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 void UpdateBytesForStream(QuicStreamId stream_id, size_t bytes) { 79 void UpdateBytesForStream(QuicStreamId stream_id, size_t bytes) {
80 if (batch_write_stream_id_[last_priority_popped_] == stream_id) { 80 if (batch_write_stream_id_[last_priority_popped_] == stream_id) {
81 // If this was the last data stream popped by PopFront, update the 81 // If this was the last data stream popped by PopFront, update the
82 // bytes remaining in its batch write. 82 // bytes remaining in its batch write.
83 bytes_left_for_batch_write_[last_priority_popped_] -= bytes; 83 bytes_left_for_batch_write_[last_priority_popped_] -= bytes;
84 } else { 84 } else {
85 // If a batch write stream was set, it should only be preempted by the 85 // If a batch write stream was set, it should only be preempted by the
86 // crypto or headers streams. Any higher priority data stream would 86 // crypto or headers streams. Any higher priority data stream would
87 // *become* the new batch write stream. 87 // *become* the new batch write stream.
88 if (FLAGS_respect_send_alarm && 88 if (FLAGS_quic_respect_send_alarm &&
89 FLAGS_quic_batch_writes) { 89 FLAGS_quic_batch_writes) {
90 DCHECK(stream_id == kCryptoStreamId || stream_id == kHeadersStreamId || 90 // TODO(ianswettt): Determine why this DCHECK failed.
91 batch_write_stream_id_[last_priority_popped_] == 0 || 91 // DCHECK(stream_id == kCryptoStreamId || stream_id == kHeadersStreamId | |
92 bytes == 0); 92 // batch_write_stream_id_[last_priority_popped_] == 0 ||
93 // bytes == 0);
93 } 94 }
94 } 95 }
95 } 96 }
96 97
97 // Pushes a stream to the back of the std::list for this priority level *unles s* it 98 // Pushes a stream to the back of the std::list for this priority level *unles s* it
98 // is latched for doing batched writes in which case it goes to the front of 99 // is latched for doing batched writes in which case it goes to the front of
99 // the std::list for this priority level. 100 // the std::list for this priority level.
100 // Headers and crypto streams are special cased to always resume first. 101 // Headers and crypto streams are special cased to always resume first.
101 void AddStream(QuicStreamId stream_id, SpdyPriority priority) { 102 void AddStream(QuicStreamId stream_id, SpdyPriority priority) {
102 if (stream_id == kCryptoStreamId) { 103 if (stream_id == kCryptoStreamId) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 bool crypto_stream_blocked_; 146 bool crypto_stream_blocked_;
146 bool headers_stream_blocked_; 147 bool headers_stream_blocked_;
147 148
148 DISALLOW_COPY_AND_ASSIGN(QuicWriteBlockedList); 149 DISALLOW_COPY_AND_ASSIGN(QuicWriteBlockedList);
149 }; 150 };
150 151
151 } // namespace net 152 } // namespace net
152 153
153 154
154 #endif // NET_QUIC_QUIC_WRITE_BLOCKED_LIST_H_ 155 #endif // NET_QUIC_QUIC_WRITE_BLOCKED_LIST_H_
OLDNEW
« no previous file with comments | « net/quic/quic_flags.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698