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

Unified Diff: net/quic/reliable_quic_stream.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/reliable_quic_stream.h ('k') | net/quic/test_tools/mock_crypto_client_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/reliable_quic_stream.cc
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index 70b6d9af0305132fd85a2ca8c425f321558dc8be..116d843db4f9ad1027d97918b3aee69c479df05b 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -363,7 +363,7 @@ QuicConsumedData ReliableQuicStream::WritevData(
if (flow_controller_.IsEnabled()) {
// How much data we are allowed to write from flow control.
- uint64 send_window = flow_controller_.SendWindowSize();
+ QuicByteCount send_window = flow_controller_.SendWindowSize();
// TODO(rjshade): Remove connection_flow_controller_->IsEnabled() check when
// removing QUIC_VERSION_19.
if (stream_contributes_to_connection_flow_control_ &&
@@ -383,7 +383,7 @@ QuicConsumedData ReliableQuicStream::WritevData(
fin = false;
// Writing more data would be a violation of flow control.
- write_length = send_window;
+ write_length = static_cast<size_t>(send_window);
}
}
@@ -466,7 +466,8 @@ void ReliableQuicStream::OnClose() {
// As there may be more bytes in flight and we need to ensure that both
// endpoints have the same connection level flow control state, mark all
// unreceived or buffered bytes as consumed.
- uint64 bytes_to_consume = flow_controller_.highest_received_byte_offset() -
+ QuicByteCount bytes_to_consume =
+ flow_controller_.highest_received_byte_offset() -
flow_controller_.bytes_consumed();
AddBytesConsumed(bytes_to_consume);
}
@@ -487,7 +488,8 @@ void ReliableQuicStream::OnWindowUpdateFrame(
}
}
-bool ReliableQuicStream::MaybeIncreaseHighestReceivedOffset(uint64 new_offset) {
+bool ReliableQuicStream::MaybeIncreaseHighestReceivedOffset(
+ QuicStreamOffset new_offset) {
if (!flow_controller_.IsEnabled()) {
return false;
}
@@ -508,7 +510,7 @@ bool ReliableQuicStream::MaybeIncreaseHighestReceivedOffset(uint64 new_offset) {
return true;
}
-void ReliableQuicStream::AddBytesSent(uint64 bytes) {
+void ReliableQuicStream::AddBytesSent(QuicByteCount bytes) {
if (flow_controller_.IsEnabled()) {
flow_controller_.AddBytesSent(bytes);
if (stream_contributes_to_connection_flow_control_) {
@@ -517,7 +519,7 @@ void ReliableQuicStream::AddBytesSent(uint64 bytes) {
}
}
-void ReliableQuicStream::AddBytesConsumed(uint64 bytes) {
+void ReliableQuicStream::AddBytesConsumed(QuicByteCount bytes) {
if (flow_controller_.IsEnabled()) {
// Only adjust stream level flow controller if we are still reading.
if (!read_side_closed_) {
@@ -530,7 +532,7 @@ void ReliableQuicStream::AddBytesConsumed(uint64 bytes) {
}
}
-void ReliableQuicStream::UpdateSendWindowOffset(uint64 new_window) {
+void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) {
if (flow_controller_.UpdateSendWindowOffset(new_window)) {
OnCanWrite();
}
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | net/quic/test_tools/mock_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698