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

Unified Diff: net/quic/quic_packet_generator.h

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 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/quic_packet_creator_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.h
diff --git a/net/quic/quic_packet_generator.h b/net/quic/quic_packet_generator.h
index 2882aab5e0095bf8f7a7ca18cd0571fcf2860947..f35f9bd52a07490fc6de6f8f12358494c01f7e3d 100644
--- a/net/quic/quic_packet_generator.h
+++ b/net/quic/quic_packet_generator.h
@@ -53,6 +53,7 @@
#ifndef NET_QUIC_QUIC_PACKET_GENERATOR_H_
#define NET_QUIC_QUIC_PACKET_GENERATOR_H_
+#include "net/quic/quic_ack_notifier.h"
#include "net/quic/quic_packet_creator.h"
#include "net/quic/quic_sent_packet_manager.h"
#include "net/quic/quic_types.h"
@@ -63,8 +64,6 @@ namespace test {
class QuicPacketGeneratorPeer;
} // namespace test
-class QuicAckNotifier;
-
class NET_EXPORT_PRIVATE QuicPacketGenerator {
public:
class NET_EXPORT_PRIVATE DelegateInterface {
@@ -102,6 +101,9 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
// Called by the connection in the event of the congestion window changing.
void OnCongestionWindowChange(QuicPacketCount max_packets_in_flight);
+ // Called by the connection when the RTT may have changed.
+ void OnRttChange(QuicTime::Delta rtt);
+
// Indicates that an ACK frame should be sent. If |also_send_feedback| is
// true, then it also indicates a CONGESTION_FEEDBACK frame should be sent.
// If |also_send_stop_waiting| is true, then it also indicates that a
@@ -118,17 +120,15 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
// Given some data, may consume part or all of it and pass it to the
// packet creator to be serialized into packets. If not in batch
- // mode, these packets will also be sent during this call. Also
- // attaches a QuicAckNotifier to any created stream frames, which
- // will be called once the frame is ACKed by the peer. The
- // QuicAckNotifier is owned by the QuicConnection. |notifier| may
- // be nullptr.
+ // mode, these packets will also be sent during this call.
+ // |delegate| (if not nullptr) will be informed once all packets sent as a
+ // result of this call are ACKed by the peer.
QuicConsumedData ConsumeData(QuicStreamId id,
const IOVector& data,
QuicStreamOffset offset,
bool fin,
FecProtection fec_protection,
- QuicAckNotifier* notifier);
+ QuicAckNotifier::DelegateInterface* delegate);
// Indicates whether batch mode is currently enabled.
bool InBatchMode();
@@ -185,6 +185,8 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
debug_delegate_ = debug_delegate;
}
+ QuicTime::Delta fec_timeout() { return fec_timeout_; }
+
private:
friend class test::QuicPacketGeneratorPeer;
@@ -226,6 +228,9 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
// True if batch mode is currently enabled.
bool batch_mode_;
+ // Timeout used for FEC alarm. Can be set to zero.
+ QuicTime::Delta fec_timeout_;
+
// True if FEC protection is on. The creator may have an open FEC group even
// if this variable is false.
bool should_fec_protect_;
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698