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

Unified Diff: net/quic/quic_write_blocked_list.h

Issue 989523005: Avoid duplicates in SPDY's write blocked list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use hash_map. Created 5 years, 9 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
Index: net/quic/quic_write_blocked_list.h
diff --git a/net/quic/quic_write_blocked_list.h b/net/quic/quic_write_blocked_list.h
index 6727fb4e826e2fae1d5653a153ab3cbcacd1347b..cb6a89a3ce3ce3b791ba9bf83053939960b4615e 100644
--- a/net/quic/quic_write_blocked_list.h
+++ b/net/quic/quic_write_blocked_list.h
@@ -24,7 +24,7 @@ class NET_EXPORT_PRIVATE QuicWriteBlockedList {
static const QuicPriority kHighestPriority;
static const QuicPriority kLowestPriority;
- QuicWriteBlockedList();
+ explicit QuicWriteBlockedList(bool avoid_duplicate_streams);
~QuicWriteBlockedList();
bool HasWriteBlockedDataStreams() const {
@@ -80,7 +80,8 @@ class NET_EXPORT_PRIVATE QuicWriteBlockedList {
return;
}
- if (blocked_streams_.find(stream_id) != blocked_streams_.end()) {
+ if (!base_write_blocked_list_.avoids_inserting_duplicates() &&
+ blocked_streams_.find(stream_id) != blocked_streams_.end()) {
DVLOG(1) << "Stream " << stream_id << " already in write blocked list.";
return;
}

Powered by Google App Engine
This is Rietveld 408576698