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

Unified Diff: net/quic/quic_flow_controller.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_flow_controller.h ('k') | net/quic/quic_flow_controller_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_flow_controller.cc
diff --git a/net/quic/quic_flow_controller.cc b/net/quic/quic_flow_controller.cc
index 722b243b01054f69dfa411ee994ea21bc61a46cd..59ae8c012b0e37ba42c1413656737c477ebb1bfb 100644
--- a/net/quic/quic_flow_controller.cc
+++ b/net/quic/quic_flow_controller.cc
@@ -16,9 +16,9 @@ namespace net {
QuicFlowController::QuicFlowController(QuicConnection* connection,
QuicStreamId id,
bool is_server,
- uint64 send_window_offset,
- uint64 receive_window_offset,
- uint64 max_receive_window)
+ QuicStreamOffset send_window_offset,
+ QuicStreamOffset receive_window_offset,
+ QuicByteCount max_receive_window)
: connection_(connection),
id_(id),
is_enabled_(true),
@@ -38,7 +38,7 @@ QuicFlowController::QuicFlowController(QuicConnection* connection,
<< ", setting send window offset to: " << send_window_offset_;
}
-void QuicFlowController::AddBytesConsumed(uint64 bytes_consumed) {
+void QuicFlowController::AddBytesConsumed(QuicByteCount bytes_consumed) {
if (!IsEnabled()) {
return;
}
@@ -49,7 +49,8 @@ void QuicFlowController::AddBytesConsumed(uint64 bytes_consumed) {
MaybeSendWindowUpdate();
}
-bool QuicFlowController::UpdateHighestReceivedOffset(uint64 new_offset) {
+bool QuicFlowController::UpdateHighestReceivedOffset(
+ QuicStreamOffset new_offset) {
if (!IsEnabled()) {
return false;
}
@@ -66,7 +67,7 @@ bool QuicFlowController::UpdateHighestReceivedOffset(uint64 new_offset) {
return true;
}
-void QuicFlowController::AddBytesSent(uint64 bytes_sent) {
+void QuicFlowController::AddBytesSent(QuicByteCount bytes_sent) {
if (!IsEnabled()) {
return;
}
@@ -111,8 +112,8 @@ void QuicFlowController::MaybeSendWindowUpdate() {
// (receive window offset - consumed bytes) < (max window / 2).
// This is behaviour copied from SPDY.
DCHECK_LT(bytes_consumed_, receive_window_offset_);
- size_t consumed_window = receive_window_offset_ - bytes_consumed_;
- size_t threshold = (max_receive_window_ / 2);
+ QuicStreamOffset consumed_window = receive_window_offset_ - bytes_consumed_;
+ QuicByteCount threshold = (max_receive_window_ / 2);
if (consumed_window < threshold) {
// Update our receive window.
@@ -151,7 +152,8 @@ void QuicFlowController::MaybeSendBlocked() {
}
}
-bool QuicFlowController::UpdateSendWindowOffset(uint64 new_send_window_offset) {
+bool QuicFlowController::UpdateSendWindowOffset(
+ QuicStreamOffset new_send_window_offset) {
if (!IsEnabled()) {
return false;
}
« no previous file with comments | « net/quic/quic_flow_controller.h ('k') | net/quic/quic_flow_controller_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698