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

Side by Side Diff: net/spdy/spdy_write_queue.cc

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/spdy_session.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "net/spdy/spdy_write_queue.h" 5 #include "net/spdy/spdy_write_queue.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 void SpdyWriteQueue::RemovePendingWritesForStream( 77 void SpdyWriteQueue::RemovePendingWritesForStream(
78 const base::WeakPtr<SpdyStream>& stream) { 78 const base::WeakPtr<SpdyStream>& stream) {
79 CHECK(!removing_writes_); 79 CHECK(!removing_writes_);
80 removing_writes_ = true; 80 removing_writes_ = true;
81 RequestPriority priority = stream->priority(); 81 RequestPriority priority = stream->priority();
82 CHECK_GE(priority, MINIMUM_PRIORITY); 82 CHECK_GE(priority, MINIMUM_PRIORITY);
83 CHECK_LE(priority, MAXIMUM_PRIORITY); 83 CHECK_LE(priority, MAXIMUM_PRIORITY);
84 84
85 DCHECK(stream.get()); 85 DCHECK(stream.get());
86 #if DCHECK_IS_ON 86 #if DCHECK_IS_ON()
87 // |stream| should not have pending writes in a queue not matching 87 // |stream| should not have pending writes in a queue not matching
88 // its priority. 88 // its priority.
89 for (int i = MINIMUM_PRIORITY; i <= MAXIMUM_PRIORITY; ++i) { 89 for (int i = MINIMUM_PRIORITY; i <= MAXIMUM_PRIORITY; ++i) {
90 if (priority == i) 90 if (priority == i)
91 continue; 91 continue;
92 for (std::deque<PendingWrite>::const_iterator it = queue_[i].begin(); 92 for (std::deque<PendingWrite>::const_iterator it = queue_[i].begin();
93 it != queue_[i].end(); ++it) { 93 it != queue_[i].end(); ++it) {
94 DCHECK_NE(it->stream.get(), stream.get()); 94 DCHECK_NE(it->stream.get(), stream.get());
95 } 95 }
96 } 96 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 it != queue_[i].end(); ++it) { 153 it != queue_[i].end(); ++it) {
154 erased_buffer_producers.push_back(it->frame_producer); 154 erased_buffer_producers.push_back(it->frame_producer);
155 } 155 }
156 queue_[i].clear(); 156 queue_[i].clear();
157 } 157 }
158 removing_writes_ = false; 158 removing_writes_ = false;
159 STLDeleteElements(&erased_buffer_producers); // Invokes callbacks. 159 STLDeleteElements(&erased_buffer_producers); // Invokes callbacks.
160 } 160 }
161 161
162 } // namespace net 162 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698