| Index: net/quic/core/congestion_control/pacing_sender.h
|
| diff --git a/net/quic/core/congestion_control/pacing_sender.h b/net/quic/core/congestion_control/pacing_sender.h
|
| index 98c27da28891ee854b544fa7e9fa643475f050a0..93498719a49164f2178e81650d1fcaa1fdc28733 100644
|
| --- a/net/quic/core/congestion_control/pacing_sender.h
|
| +++ b/net/quic/core/congestion_control/pacing_sender.h
|
| @@ -25,58 +25,37 @@
|
|
|
| namespace net {
|
|
|
| -class NET_EXPORT_PRIVATE PacingSender : public SendAlgorithmInterface {
|
| +class NET_EXPORT_PRIVATE PacingSender {
|
| public:
|
| - // Create a PacingSender to wrap the specified sender. |alarm_granularity|
|
| - // indicates to the pacer to send that far into the future, since it should
|
| - // not expect a callback before that time delta. |initial_packet_burst| is
|
| - // the number of packets sent without pacing after quiescence.
|
| - PacingSender(SendAlgorithmInterface* sender,
|
| - QuicTime::Delta alarm_granularity,
|
| - uint32_t initial_packet_burst);
|
| - ~PacingSender() override;
|
| + PacingSender();
|
| + ~PacingSender();
|
|
|
| - void SetMaxPacingRate(QuicBandwidth max_pacing_rate);
|
| + // Sets the underlying sender. Does not take ownership of |sender|. |sender|
|
| + // must not be null. This must be called before any of the
|
| + // SendAlgorithmInterface wrapper methods are called.
|
| + void set_sender(SendAlgorithmInterface* sender);
|
|
|
| - // SendAlgorithmInterface methods.
|
| - void SetFromConfig(const QuicConfig& config,
|
| - Perspective perspective) override;
|
| - void ResumeConnectionState(
|
| - const CachedNetworkParameters& cached_network_params,
|
| - bool max_bandwidth_resumption) override;
|
| - void SetNumEmulatedConnections(int num_connections) override;
|
| - void OnCongestionEvent(bool rtt_updated,
|
| - QuicByteCount bytes_in_flight,
|
| - const CongestionVector& acked_packets,
|
| - const CongestionVector& lost_packets) override;
|
| + void set_max_pacing_rate(QuicBandwidth max_pacing_rate) {
|
| + max_pacing_rate_ = max_pacing_rate;
|
| + }
|
| +
|
| + void OnCongestionEvent(
|
| + bool rtt_updated,
|
| + QuicByteCount bytes_in_flight,
|
| + const SendAlgorithmInterface::CongestionVector& acked_packets,
|
| + const SendAlgorithmInterface::CongestionVector& lost_packets);
|
| bool OnPacketSent(QuicTime sent_time,
|
| QuicByteCount bytes_in_flight,
|
| QuicPacketNumber packet_number,
|
| QuicByteCount bytes,
|
| - HasRetransmittableData is_retransmittable) override;
|
| - void OnRetransmissionTimeout(bool packets_retransmitted) override;
|
| - void OnConnectionMigration() override;
|
| + HasRetransmittableData is_retransmittable);
|
| QuicTime::Delta TimeUntilSend(QuicTime now,
|
| - QuicByteCount bytes_in_flight) const override;
|
| - QuicBandwidth PacingRate(QuicByteCount bytes_in_flight) const override;
|
| - QuicBandwidth BandwidthEstimate() const override;
|
| - QuicTime::Delta RetransmissionDelay() const override;
|
| - QuicByteCount GetCongestionWindow() const override;
|
| - bool InSlowStart() const override;
|
| - bool InRecovery() const override;
|
| - QuicByteCount GetSlowStartThreshold() const override;
|
| - CongestionControlType GetCongestionControlType() const override;
|
| - std::string GetDebugState() const override;
|
| - void OnApplicationLimited(QuicByteCount bytes_in_flight) override;
|
| - // End implementation of SendAlgorithmInterface.
|
| + QuicByteCount bytes_in_flight) const;
|
| + QuicBandwidth PacingRate(QuicByteCount bytes_in_flight) const;
|
|
|
| private:
|
| - std::unique_ptr<SendAlgorithmInterface> sender_; // Underlying sender.
|
| - // The estimated system alarm granularity.
|
| - const QuicTime::Delta alarm_granularity_;
|
| - // Configured maximum size of the burst coming out of quiescence. The burst
|
| - // is never larger than the current CWND in packets.
|
| - const uint32_t initial_packet_burst_;
|
| + // Underlying sender. Not owned.
|
| + SendAlgorithmInterface* sender_;
|
| // If not QuicBandidth::Zero, the maximum rate the PacingSender will use.
|
| QuicBandwidth max_pacing_rate_;
|
|
|
|
|