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

Side by Side Diff: net/quic/quic_session.cc

Issue 1811043002: Landing Recent QUIC changes until 2016-03-15 16:26 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an export clause. Created 4 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/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_session_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/quic/quic_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "net/quic/crypto/proof_verifier.h" 10 #include "net/quic/crypto/proof_verifier.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 num_writes += 1; 177 num_writes += 1;
178 } 178 }
179 if (write_blocked_streams_.headers_stream_blocked()) { 179 if (write_blocked_streams_.headers_stream_blocked()) {
180 num_writes += 1; 180 num_writes += 1;
181 } 181 }
182 } 182 }
183 if (num_writes == 0) { 183 if (num_writes == 0) {
184 return; 184 return;
185 } 185 }
186 186
187 QuicConnection::ScopedPacketBundler ack_bundler(connection_.get(), 187 QuicConnection::ScopedPacketBundler ack_bundler(
188 QuicConnection::NO_ACK); 188 connection_.get(), QuicConnection::SEND_ACK_IF_QUEUED);
189 for (size_t i = 0; i < num_writes; ++i) { 189 for (size_t i = 0; i < num_writes; ++i) {
190 if (!(write_blocked_streams_.HasWriteBlockedCryptoOrHeadersStream() || 190 if (!(write_blocked_streams_.HasWriteBlockedCryptoOrHeadersStream() ||
191 write_blocked_streams_.HasWriteBlockedDataStreams())) { 191 write_blocked_streams_.HasWriteBlockedDataStreams())) {
192 // Writing one stream removed another!? Something's broken. 192 // Writing one stream removed another!? Something's broken.
193 QUIC_BUG << "WriteBlockedStream is missing"; 193 QUIC_BUG << "WriteBlockedStream is missing";
194 connection_->CloseConnection(QUIC_INTERNAL_ERROR, 194 connection_->CloseConnection(QUIC_INTERNAL_ERROR,
195 ConnectionCloseSource::FROM_SELF); 195 ConnectionCloseSource::FROM_SELF);
196 return; 196 return;
197 } 197 }
198 if (!connection_->CanWriteStreamData()) { 198 if (!connection_->CanWriteStreamData()) {
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 801
802 size_t QuicSession::MaxAvailableStreams() const { 802 size_t QuicSession::MaxAvailableStreams() const {
803 return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier; 803 return max_open_incoming_streams_ * kMaxAvailableStreamsMultiplier;
804 } 804 }
805 805
806 bool QuicSession::IsIncomingStream(QuicStreamId id) const { 806 bool QuicSession::IsIncomingStream(QuicStreamId id) const {
807 return id % 2 != next_outgoing_stream_id_ % 2; 807 return id % 2 != next_outgoing_stream_id_ % 2;
808 } 808 }
809 809
810 } // namespace net 810 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698