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

Unified Diff: net/quic/core/quic_connection.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_connection.h ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_connection.cc
diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
index 66f5be67dfaf18d0bbe4daf1ecb6a72ddae3a40d..59fa781e3d3595ef2ce8e917e4e9c0389c6a79e1 100644
--- a/net/quic/core/quic_connection.cc
+++ b/net/quic/core/quic_connection.cc
@@ -24,12 +24,12 @@
#include "net/quic/core/proto/cached_network_parameters.pb.h"
#include "net/quic/core/quic_bandwidth.h"
#include "net/quic/core/quic_config.h"
-#include "net/quic/core/quic_flags.h"
#include "net/quic/core/quic_packet_generator.h"
#include "net/quic/core/quic_pending_retransmission.h"
#include "net/quic/core/quic_utils.h"
#include "net/quic/platform/api/quic_bug_tracker.h"
#include "net/quic/platform/api/quic_flag_utils.h"
+#include "net/quic/platform/api/quic_flags.h"
#include "net/quic/platform/api/quic_logging.h"
#include "net/quic/platform/api/quic_map_util.h"
#include "net/quic/platform/api/quic_str_cat.h"
@@ -240,6 +240,7 @@ QuicConnection::QuicConnection(QuicConnectionId connection_id,
debug_visitor_(nullptr),
packet_generator_(connection_id_,
&framer_,
+ random_generator_,
helper->GetBufferAllocator(),
this),
idle_network_timeout_(QuicTime::Delta::Infinite()),
@@ -1057,9 +1058,9 @@ QuicConsumedData QuicConnection::SendStreamData(
QuicStreamId id,
QuicIOVector iov,
QuicStreamOffset offset,
- bool fin,
+ StreamSendingState state,
QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) {
- if (!fin && iov.total_length == 0) {
+ if (state == NO_FIN && iov.total_length == 0) {
QUIC_BUG << "Attempt to send empty stream frame";
return QuicConsumedData(0, false);
}
@@ -1074,12 +1075,12 @@ QuicConsumedData QuicConnection::SendStreamData(
// The optimized path may be used for data only packets which fit into a
// standard buffer and don't need padding.
if (id != kCryptoStreamId && !packet_generator_.HasQueuedFrames() &&
- iov.total_length > kMaxPacketSize) {
+ iov.total_length > kMaxPacketSize && state != FIN_AND_PADDING) {
// Use the fast path to send full data packets.
- return packet_generator_.ConsumeDataFastPath(id, iov, offset, fin,
- std::move(ack_listener));
+ return packet_generator_.ConsumeDataFastPath(
+ id, iov, offset, state != NO_FIN, std::move(ack_listener));
}
- return packet_generator_.ConsumeData(id, iov, offset, fin,
+ return packet_generator_.ConsumeData(id, iov, offset, state,
std::move(ack_listener));
}
« no previous file with comments | « net/quic/core/quic_connection.h ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698