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

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

Issue 1548783002: Adding details to most quic connection close calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110540464
Patch Set: Created 4 years, 12 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_spdy_stream_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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // This count includes duplicate data received. 108 // This count includes duplicate data received.
109 size_t frame_payload_size = frame.frame_length; 109 size_t frame_payload_size = frame.frame_length;
110 stream_bytes_read_ += frame_payload_size; 110 stream_bytes_read_ += frame_payload_size;
111 111
112 // Flow control is interested in tracking highest received offset. 112 // Flow control is interested in tracking highest received offset.
113 if (MaybeIncreaseHighestReceivedOffset(frame.offset + frame_payload_size)) { 113 if (MaybeIncreaseHighestReceivedOffset(frame.offset + frame_payload_size)) {
114 // As the highest received offset has changed, check to see if this is a 114 // As the highest received offset has changed, check to see if this is a
115 // violation of flow control. 115 // violation of flow control.
116 if (flow_controller_.FlowControlViolation() || 116 if (flow_controller_.FlowControlViolation() ||
117 connection_flow_controller_->FlowControlViolation()) { 117 connection_flow_controller_->FlowControlViolation()) {
118 session_->connection()->SendConnectionClose( 118 session_->connection()->SendConnectionCloseWithDetails(
119 QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA); 119 QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA,
120 "Flow control violation after increasing offset");
120 return; 121 return;
121 } 122 }
122 } 123 }
123 124
124 sequencer_.OnStreamFrame(frame); 125 sequencer_.OnStreamFrame(frame);
125 } 126 }
126 127
127 int ReliableQuicStream::num_frames_received() const { 128 int ReliableQuicStream::num_frames_received() const {
128 return sequencer_.num_frames_received(); 129 return sequencer_.num_frames_received();
129 } 130 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 459 }
459 } 460 }
460 461
461 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { 462 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) {
462 if (flow_controller_.UpdateSendWindowOffset(new_window)) { 463 if (flow_controller_.UpdateSendWindowOffset(new_window)) {
463 OnCanWrite(); 464 OnCanWrite();
464 } 465 }
465 } 466 }
466 467
467 } // namespace net 468 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_spdy_stream_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