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

Side by Side Diff: net/quic/core/quic_flow_controller.h

Issue 2825083003: Landing Recent QUIC changes until Mon Apr 17 2017 (Closed)
Patch Set: Format Created 3 years, 8 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/core/quic_flags_list.h ('k') | net/quic/core/quic_flow_controller.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_ 5 #ifndef NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_
6 #define NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_ 6 #define NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "net/quic/core/quic_packets.h" 9 #include "net/quic/core/quic_packets.h"
10 #include "net/quic/platform/api/quic_export.h" 10 #include "net/quic/platform/api/quic_export.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // in the case where |new_offset| is <= highest_received_byte_offset_. 55 // in the case where |new_offset| is <= highest_received_byte_offset_.
56 bool UpdateHighestReceivedOffset(QuicStreamOffset new_offset); 56 bool UpdateHighestReceivedOffset(QuicStreamOffset new_offset);
57 57
58 // Called when bytes received from the peer are consumed locally. This may 58 // Called when bytes received from the peer are consumed locally. This may
59 // trigger the sending of a WINDOW_UPDATE frame using |connection|. 59 // trigger the sending of a WINDOW_UPDATE frame using |connection|.
60 void AddBytesConsumed(QuicByteCount bytes_consumed); 60 void AddBytesConsumed(QuicByteCount bytes_consumed);
61 61
62 // Called when bytes are sent to the peer. 62 // Called when bytes are sent to the peer.
63 void AddBytesSent(QuicByteCount bytes_sent); 63 void AddBytesSent(QuicByteCount bytes_sent);
64 64
65 // Set a new send window offset. 65 // Increases |send_window_offset_| if |new_send_window_offset| is
66 // Returns true if this increases send_window_offset_ and is now blocked. 66 // greater than the current value. Returns true if this increase
67 // also causes us to change from a blocked state to unblocked. In
68 // all other cases, returns false.
67 bool UpdateSendWindowOffset(QuicStreamOffset new_send_window_offset); 69 bool UpdateSendWindowOffset(QuicStreamOffset new_send_window_offset);
68 70
69 // QuicFlowControllerInterface. 71 // QuicFlowControllerInterface.
70 void EnsureWindowAtLeast(QuicByteCount window_size) override; 72 void EnsureWindowAtLeast(QuicByteCount window_size) override;
71 73
72 // Returns the current available send window. 74 // Returns the current available send window.
73 QuicByteCount SendWindowSize() const; 75 QuicByteCount SendWindowSize() const;
74 76
75 // Send a BLOCKED frame if appropriate. 77 // Send a BLOCKED frame if appropriate.
76 void MaybeSendBlocked(); 78 void MaybeSendBlocked();
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Keep time of the last time a window update was sent. We use this 192 // Keep time of the last time a window update was sent. We use this
191 // as part of the receive window auto tuning. 193 // as part of the receive window auto tuning.
192 QuicTime prev_window_update_time_; 194 QuicTime prev_window_update_time_;
193 195
194 DISALLOW_COPY_AND_ASSIGN(QuicFlowController); 196 DISALLOW_COPY_AND_ASSIGN(QuicFlowController);
195 }; 197 };
196 198
197 } // namespace net 199 } // namespace net
198 200
199 #endif // NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_ 201 #endif // NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_flow_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698