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

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

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 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_time_wait_list_manager.cc ('k') | net/quic/test_tools/crypto_test_utils.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_flow_controller.h" 9 #include "net/quic/quic_flow_controller.h"
10 #include "net/quic/quic_session.h" 10 #include "net/quic/quic_session.h"
(...skipping 24 matching lines...) Expand all
35 return session->config()->GetInitialStreamFlowControlWindowToSend(); 35 return session->config()->GetInitialStreamFlowControlWindowToSend();
36 } 36 }
37 37
38 size_t GetReceivedFlowControlWindow(QuicSession* session) { 38 size_t GetReceivedFlowControlWindow(QuicSession* session) {
39 QuicVersion version = session->connection()->version(); 39 QuicVersion version = session->connection()->version();
40 if (version <= QUIC_VERSION_19) { 40 if (version <= QUIC_VERSION_19) {
41 if (session->config()->HasReceivedInitialFlowControlWindowBytes()) { 41 if (session->config()->HasReceivedInitialFlowControlWindowBytes()) {
42 return session->config()->ReceivedInitialFlowControlWindowBytes(); 42 return session->config()->ReceivedInitialFlowControlWindowBytes();
43 } 43 }
44 44
45 return kDefaultFlowControlSendWindow; 45 return kMinimumFlowControlSendWindow;
46 } 46 }
47 47
48 // Version must be >= QUIC_VERSION_21, so we check for stream specific flow 48 // Version must be >= QUIC_VERSION_21, so we check for stream specific flow
49 // control window. 49 // control window.
50 if (session->config()->HasReceivedInitialStreamFlowControlWindowBytes()) { 50 if (session->config()->HasReceivedInitialStreamFlowControlWindowBytes()) {
51 return session->config()->ReceivedInitialStreamFlowControlWindowBytes(); 51 return session->config()->ReceivedInitialStreamFlowControlWindowBytes();
52 } 52 }
53 53
54 return kDefaultFlowControlSendWindow; 54 return kMinimumFlowControlSendWindow;
55 } 55 }
56 56
57 } // namespace 57 } // namespace
58 58
59 // Wrapper that aggregates OnAckNotifications for packets sent using 59 // Wrapper that aggregates OnAckNotifications for packets sent using
60 // WriteOrBufferData and delivers them to the original 60 // WriteOrBufferData and delivers them to the original
61 // QuicAckNotifier::DelegateInterface after all bytes written using 61 // QuicAckNotifier::DelegateInterface after all bytes written using
62 // WriteOrBufferData are acked. This level of indirection is 62 // WriteOrBufferData are acked. This level of indirection is
63 // necessary because the delegate interface provides no mechanism that 63 // necessary because the delegate interface provides no mechanism that
64 // WriteOrBufferData can use to inform it that the write required 64 // WriteOrBufferData can use to inform it that the write required
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 541
542 bool ReliableQuicStream::IsFlowControlBlocked() { 542 bool ReliableQuicStream::IsFlowControlBlocked() {
543 if (flow_controller_.IsBlocked()) { 543 if (flow_controller_.IsBlocked()) {
544 return true; 544 return true;
545 } 545 }
546 return stream_contributes_to_connection_flow_control_ && 546 return stream_contributes_to_connection_flow_control_ &&
547 connection_flow_controller_->IsBlocked(); 547 connection_flow_controller_->IsBlocked();
548 } 548 }
549 549
550 } // namespace net 550 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_time_wait_list_manager.cc ('k') | net/quic/test_tools/crypto_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698