| Index: net/tools/quic/test_tools/packet_dropping_test_writer.h
|
| diff --git a/net/tools/quic/test_tools/packet_dropping_test_writer.h b/net/tools/quic/test_tools/packet_dropping_test_writer.h
|
| index e181fdbfcd8001598af7c8cff5f680c6f4249b93..ae1aac009cd36c378241c74e5715e4efd1b57a87 100644
|
| --- a/net/tools/quic/test_tools/packet_dropping_test_writer.h
|
| +++ b/net/tools/quic/test_tools/packet_dropping_test_writer.h
|
| @@ -69,6 +69,13 @@ class PacketDroppingTestWriter : public QuicPacketWriterWrapper {
|
| fake_packet_loss_percentage_ = fake_packet_loss_percentage;
|
| }
|
|
|
| + // Simulate dropping the first n packets unconditionally.
|
| + // Subsequent packets will be lost at fake_packet_loss_percentage_ if set.
|
| + void set_fake_drop_first_n_packets(int32 fake_drop_first_n_packets) {
|
| + base::AutoLock locked(config_mutex_);
|
| + fake_drop_first_n_packets_ = fake_drop_first_n_packets;
|
| + }
|
| +
|
| // The percent of time WritePacket will block and set WriteResult's status
|
| // to WRITE_STATUS_BLOCKED.
|
| void set_fake_blocked_socket_percentage(
|
| @@ -141,9 +148,11 @@ class PacketDroppingTestWriter : public QuicPacketWriterWrapper {
|
| // Stored packets delayed by fake packet delay or bandwidth restrictions.
|
| DelayedPacketList delayed_packets_;
|
| QuicByteCount cur_buffer_size_;
|
| + uint64 num_calls_to_write_;
|
|
|
| base::Lock config_mutex_;
|
| int32 fake_packet_loss_percentage_;
|
| + int32 fake_drop_first_n_packets_;
|
| int32 fake_blocked_socket_percentage_;
|
| int32 fake_packet_reorder_percentage_;
|
| QuicTime::Delta fake_packet_delay_;
|
|
|