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

Side by Side Diff: net/tools/quic/test_tools/packet_dropping_test_writer.h

Issue 1779883005: Remove unused return value from QuicAlarm::Delegate::OnAlarm. No behavior change, not protected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116388439
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ 6 #define NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 bool IsWriteBlocked() const override; 57 bool IsWriteBlocked() const override;
58 58
59 void SetWritable() override; 59 void SetWritable() override;
60 60
61 // Writes out any packet which should have been sent by now 61 // Writes out any packet which should have been sent by now
62 // to the contained writer and returns the time 62 // to the contained writer and returns the time
63 // for the next delayed packet to be written. 63 // for the next delayed packet to be written.
64 QuicTime ReleaseOldPackets(); 64 QuicTime ReleaseOldPackets();
65 65
66 // Sets |delay_alarm_| to fire at |new_deadline|.
67 void SetDelayAlarm(QuicTime new_deadline);
68
66 void OnCanWrite(); 69 void OnCanWrite();
67 70
68 // The percent of time a packet is simulated as being lost. 71 // The percent of time a packet is simulated as being lost.
69 void set_fake_packet_loss_percentage(int32_t fake_packet_loss_percentage) { 72 void set_fake_packet_loss_percentage(int32_t fake_packet_loss_percentage) {
70 base::AutoLock locked(config_mutex_); 73 base::AutoLock locked(config_mutex_);
71 fake_packet_loss_percentage_ = fake_packet_loss_percentage; 74 fake_packet_loss_percentage_ = fake_packet_loss_percentage;
72 } 75 }
73 76
74 // Simulate dropping the first n packets unconditionally. 77 // Simulate dropping the first n packets unconditionally.
75 // Subsequent packets will be lost at fake_packet_loss_percentage_ if set. 78 // Subsequent packets will be lost at fake_packet_loss_percentage_ if set.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 QuicBandwidth fake_bandwidth_; 171 QuicBandwidth fake_bandwidth_;
169 QuicByteCount buffer_size_; 172 QuicByteCount buffer_size_;
170 173
171 DISALLOW_COPY_AND_ASSIGN(PacketDroppingTestWriter); 174 DISALLOW_COPY_AND_ASSIGN(PacketDroppingTestWriter);
172 }; 175 };
173 176
174 } // namespace test 177 } // namespace test
175 } // namespace net 178 } // namespace net
176 179
177 #endif // NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ 180 #endif // NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_time_wait_list_manager.cc ('k') | net/tools/quic/test_tools/packet_dropping_test_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698