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

Side by Side Diff: net/spdy/write_blocked_list.h

Issue 986713002: Fully qualify std::make_pair. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « net/spdy/hpack_encoder_test.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SPDY_WRITE_BLOCKED_LIST_H_ 5 #ifndef NET_SPDY_WRITE_BLOCKED_LIST_H_
6 #define NET_SPDY_WRITE_BLOCKED_LIST_H_ 6 #define NET_SPDY_WRITE_BLOCKED_LIST_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <deque> 9 #include <deque>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 write_blocked_lists_[ClampPriority(priority)].push_back(stream_id); 80 write_blocked_lists_[ClampPriority(priority)].push_back(stream_id);
81 } 81 }
82 82
83 bool RemoveStreamFromWriteBlockedList(IdType stream_id, 83 bool RemoveStreamFromWriteBlockedList(IdType stream_id,
84 SpdyPriority priority) { 84 SpdyPriority priority) {
85 // We shouldn't really add a stream_id to a list multiple times, 85 // We shouldn't really add a stream_id to a list multiple times,
86 // but under some conditions it does happen. Doing a check in PushBack 86 // but under some conditions it does happen. Doing a check in PushBack
87 // would be too costly, so instead we check here to eliminate duplicates. 87 // would be too costly, so instead we check here to eliminate duplicates.
88 bool found = false; 88 bool found = false;
89 iterator it = std::find(write_blocked_lists_[priority].begin(), 89 iterator it = std::find(write_blocked_lists_[priority].begin(),
90 write_blocked_lists_[priority].end(), 90 write_blocked_lists_[priority].end(), stream_id);
91 stream_id);
92 while (it != write_blocked_lists_[priority].end()) { 91 while (it != write_blocked_lists_[priority].end()) {
93 found = true; 92 found = true;
94 iterator next_it = write_blocked_lists_[priority].erase(it); 93 iterator next_it = write_blocked_lists_[priority].erase(it);
95 it = std::find(next_it, write_blocked_lists_[priority].end(), stream_id); 94 it = std::find(next_it, write_blocked_lists_[priority].end(), stream_id);
96 } 95 }
97 return found; 96 return found;
98 } 97 }
99 98
100 void UpdateStreamPriorityInWriteBlockedList(IdType stream_id, 99 void UpdateStreamPriorityInWriteBlockedList(IdType stream_id,
101 SpdyPriority old_priority, 100 SpdyPriority old_priority,
(...skipping 16 matching lines...) Expand all
118 } 117 }
119 118
120 private: 119 private:
121 friend WriteBlockedListPeer; 120 friend WriteBlockedListPeer;
122 BlockedList write_blocked_lists_[kLowestPriority + 1]; 121 BlockedList write_blocked_lists_[kLowestPriority + 1];
123 }; 122 };
124 123
125 } // namespace net 124 } // namespace net
126 125
127 #endif // NET_SPDY_WRITE_BLOCKED_LIST_H_ 126 #endif // NET_SPDY_WRITE_BLOCKED_LIST_H_
OLDNEW
« no previous file with comments | « net/spdy/hpack_encoder_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698