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

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

Issue 2132623002: Landing Recent QUIC changes until 2016-07-02 02:45 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing comment about RPCs Created 4 years, 5 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_utils_test.cc ('k') | net/quic/test_tools/mock_clock.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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 // A FIN with zero data payload should not be flow control blocked. 283 // A FIN with zero data payload should not be flow control blocked.
284 bool fin_with_zero_data = (fin && write_length == 0); 284 bool fin_with_zero_data = (fin && write_length == 0);
285 285
286 // How much data flow control permits to be written. 286 // How much data flow control permits to be written.
287 QuicByteCount send_window = flow_controller_.SendWindowSize(); 287 QuicByteCount send_window = flow_controller_.SendWindowSize();
288 if (stream_contributes_to_connection_flow_control_) { 288 if (stream_contributes_to_connection_flow_control_) {
289 send_window = 289 send_window =
290 min(send_window, connection_flow_controller_->SendWindowSize()); 290 min(send_window, connection_flow_controller_->SendWindowSize());
291 } 291 }
292 292
293 if (FLAGS_quic_cede_correctly && session_->ShouldYield(id())) { 293 if (session_->ShouldYield(id())) {
294 session_->MarkConnectionLevelWriteBlocked(id()); 294 session_->MarkConnectionLevelWriteBlocked(id());
295 return QuicConsumedData(0, false); 295 return QuicConsumedData(0, false);
296 } 296 }
297 297
298 if (send_window == 0 && !fin_with_zero_data) { 298 if (send_window == 0 && !fin_with_zero_data) {
299 // Quick return if nothing can be sent. 299 // Quick return if nothing can be sent.
300 MaybeSendBlocked(); 300 MaybeSendBlocked();
301 return QuicConsumedData(0, false); 301 return QuicConsumedData(0, false);
302 } 302 }
303 303
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 } 457 }
458 } 458 }
459 459
460 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { 460 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) {
461 if (flow_controller_.UpdateSendWindowOffset(new_window)) { 461 if (flow_controller_.UpdateSendWindowOffset(new_window)) {
462 OnCanWrite(); 462 OnCanWrite();
463 } 463 }
464 } 464 }
465 465
466 } // namespace net 466 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_utils_test.cc ('k') | net/quic/test_tools/mock_clock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698