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

Unified Diff: net/quic/quic_session.cc

Issue 761863002: Clean up type usage and fix MSVC "truncated value" warnings in net/quic/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix #3 Created 6 years, 1 month 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_session.h ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session.cc
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index d6af16e78964569b0f6f9e1a44814889aac010c8..f05395e77f56bf3c617e4ed8604de6bb3fbe3722 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -437,7 +437,7 @@ void QuicSession::UpdateFlowControlOnFinalReceivedByteOffset(
DVLOG(1) << ENDPOINT << "Received final byte offset " << final_byte_offset
<< " for stream " << stream_id;
- uint64 offset_diff = final_byte_offset - it->second;
+ QuicByteCount offset_diff = final_byte_offset - it->second;
if (flow_controller_->UpdateHighestReceivedOffset(
flow_controller_->highest_received_byte_offset() + offset_diff)) {
// If the final offset violates flow control, close the connection now.
@@ -483,7 +483,8 @@ void QuicSession::OnConfigNegotiated() {
if (config_.HasReceivedInitialFlowControlWindowBytes()) {
// Streams which were created before the SHLO was received (0-RTT
// requests) are now informed of the peer's initial flow control window.
- uint32 new_window = config_.ReceivedInitialFlowControlWindowBytes();
+ QuicStreamOffset new_window =
+ config_.ReceivedInitialFlowControlWindowBytes();
OnNewStreamFlowControlWindow(new_window);
OnNewSessionFlowControlWindow(new_window);
}
@@ -505,7 +506,7 @@ void QuicSession::OnConfigNegotiated() {
}
}
-void QuicSession::OnNewStreamFlowControlWindow(uint32 new_window) {
+void QuicSession::OnNewStreamFlowControlWindow(QuicStreamOffset new_window) {
if (new_window < kDefaultFlowControlSendWindow) {
LOG(ERROR)
<< "Peer sent us an invalid stream flow control send window: "
@@ -527,7 +528,7 @@ void QuicSession::OnNewStreamFlowControlWindow(uint32 new_window) {
}
}
-void QuicSession::OnNewSessionFlowControlWindow(uint32 new_window) {
+void QuicSession::OnNewSessionFlowControlWindow(QuicStreamOffset new_window) {
if (new_window < kDefaultFlowControlSendWindow) {
LOG(ERROR)
<< "Peer sent us an invalid session flow control send window: "
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698