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

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

Issue 1541263002: Landing Recent QUIC changes until 12/18/2015 13:57 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: replace -1 with 0xff for InvalidPathId Created 4 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/quic/quic_unacked_packet_map_test.cc ('k') | net/quic/reliable_quic_stream_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/reliable_quic_stream.h" 5 #include "net/quic/reliable_quic_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/iovector.h" 8 #include "net/quic/iovector.h"
9 #include "net/quic/quic_ack_listener_interface.h" 9 #include "net/quic/quic_ack_listener_interface.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // This count includes duplicate data received. 106 // This count includes duplicate data received.
107 size_t frame_payload_size = frame.frame_length; 107 size_t frame_payload_size = frame.frame_length;
108 stream_bytes_read_ += frame_payload_size; 108 stream_bytes_read_ += frame_payload_size;
109 109
110 // Flow control is interested in tracking highest received offset. 110 // Flow control is interested in tracking highest received offset.
111 if (MaybeIncreaseHighestReceivedOffset(frame.offset + frame_payload_size)) { 111 if (MaybeIncreaseHighestReceivedOffset(frame.offset + frame_payload_size)) {
112 // As the highest received offset has changed, check to see if this is a 112 // As the highest received offset has changed, check to see if this is a
113 // violation of flow control. 113 // violation of flow control.
114 if (flow_controller_.FlowControlViolation() || 114 if (flow_controller_.FlowControlViolation() ||
115 connection_flow_controller_->FlowControlViolation()) { 115 connection_flow_controller_->FlowControlViolation()) {
116 session_->connection()->SendConnectionClose( 116 session_->connection()->SendConnectionCloseWithDetails(
117 QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA); 117 QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA,
118 "Flow control violation after increasing offset");
118 return; 119 return;
119 } 120 }
120 } 121 }
121 122
122 sequencer_.OnStreamFrame(frame); 123 sequencer_.OnStreamFrame(frame);
123 } 124 }
124 125
125 int ReliableQuicStream::num_frames_received() const { 126 int ReliableQuicStream::num_frames_received() const {
126 return sequencer_.num_frames_received(); 127 return sequencer_.num_frames_received();
127 } 128 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 457 }
457 } 458 }
458 459
459 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { 460 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) {
460 if (flow_controller_.UpdateSendWindowOffset(new_window)) { 461 if (flow_controller_.UpdateSendWindowOffset(new_window)) {
461 OnCanWrite(); 462 OnCanWrite();
462 } 463 }
463 } 464 }
464 465
465 } // namespace net 466 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_unacked_packet_map_test.cc ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698