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

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

Issue 1979763002: Landing Recent QUIC changes until Sun May 8 00:39:29 2016 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_stream_sequencer_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_bug_tracker.h" 9 #include "net/quic/quic_bug_tracker.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 } 95 }
96 96
97 if (read_side_closed_) { 97 if (read_side_closed_) {
98 DVLOG(1) << ENDPOINT << "Ignoring data in frame " << frame.stream_id; 98 DVLOG(1) << ENDPOINT << "Ignoring data in frame " << frame.stream_id;
99 // The subclass does not want to read data: blackhole the data. 99 // The subclass does not want to read data: blackhole the data.
100 return; 100 return;
101 } 101 }
102 102
103 // This count includes duplicate data received. 103 // This count includes duplicate data received.
104 size_t frame_payload_size = frame.frame_length; 104 size_t frame_payload_size = frame.data_length;
105 stream_bytes_read_ += frame_payload_size; 105 stream_bytes_read_ += frame_payload_size;
106 106
107 // Flow control is interested in tracking highest received offset. 107 // Flow control is interested in tracking highest received offset.
108 if (MaybeIncreaseHighestReceivedOffset(frame.offset + frame_payload_size)) { 108 if (MaybeIncreaseHighestReceivedOffset(frame.offset + frame_payload_size)) {
109 // As the highest received offset has changed, check to see if this is a 109 // As the highest received offset has changed, check to see if this is a
110 // violation of flow control. 110 // violation of flow control.
111 if (flow_controller_.FlowControlViolation() || 111 if (flow_controller_.FlowControlViolation() ||
112 connection_flow_controller_->FlowControlViolation()) { 112 connection_flow_controller_->FlowControlViolation()) {
113 CloseConnectionWithDetails( 113 CloseConnectionWithDetails(
114 QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA, 114 QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA,
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } 451 }
452 } 452 }
453 453
454 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { 454 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) {
455 if (flow_controller_.UpdateSendWindowOffset(new_window)) { 455 if (flow_controller_.UpdateSendWindowOffset(new_window)) {
456 OnCanWrite(); 456 OnCanWrite();
457 } 457 }
458 } 458 }
459 459
460 } // namespace net 460 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_sequencer_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