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

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

Issue 1472573002: These packets got reformatted at some point, maybe before the clang-format off annotation was added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107711408
Patch Set: Created 5 years, 1 month 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
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 SpdyPriority priority = 61 SpdyPriority priority =
62 base_write_blocked_list_.GetHighestPriorityWriteBlockedList(); 62 base_write_blocked_list_.GetHighestPriorityWriteBlockedList();
63 QuicStreamId id = base_write_blocked_list_.PopFront(priority); 63 QuicStreamId id = base_write_blocked_list_.PopFront(priority);
64 64
65 if (base_write_blocked_list_.NumBlockedStreams(priority) == 0) { 65 if (base_write_blocked_list_.NumBlockedStreams(priority) == 0) {
66 // If no streams are blocked, don't bother latching. This stream will be 66 // If no streams are blocked, don't bother latching. This stream will be
67 // the first popped for its priority anyway. 67 // the first popped for its priority anyway.
68 batch_write_stream_id_[priority] = 0; 68 batch_write_stream_id_[priority] = 0;
69 last_priority_popped_ = priority;
69 } else if (batch_write_stream_id_[priority] != id) { 70 } else if (batch_write_stream_id_[priority] != id) {
70 // If newly latching this batch write stream, let it write 16k. 71 // If newly latching this batch write stream, let it write 16k.
71 batch_write_stream_id_[priority] = id; 72 batch_write_stream_id_[priority] = id;
72 bytes_left_for_batch_write_[priority] = 16000; 73 bytes_left_for_batch_write_[priority] = 16000;
73 last_priority_popped_ = priority; 74 last_priority_popped_ = priority;
74 } 75 }
75 76
76 return id; 77 return id;
77 } 78 }
78 79
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 bool crypto_stream_blocked_; 147 bool crypto_stream_blocked_;
147 bool headers_stream_blocked_; 148 bool headers_stream_blocked_;
148 149
149 DISALLOW_COPY_AND_ASSIGN(QuicWriteBlockedList); 150 DISALLOW_COPY_AND_ASSIGN(QuicWriteBlockedList);
150 }; 151 };
151 152
152 } // namespace net 153 } // namespace net
153 154
154 155
155 #endif // NET_QUIC_QUIC_WRITE_BLOCKED_LIST_H_ 156 #endif // NET_QUIC_QUIC_WRITE_BLOCKED_LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698