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

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

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 5 years, 1 month 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
« no previous file with comments | « net/tools/quic/test_tools/mock_quic_time_wait_list_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 12 matching lines...) Expand all
23 namespace test { 23 namespace test {
24 24
25 // Simulates a connection that drops packets a configured percentage of the time 25 // Simulates a connection that drops packets a configured percentage of the time
26 // and has a blocked socket a configured percentage of the time. Also provides 26 // and has a blocked socket a configured percentage of the time. Also provides
27 // the options to delay packets and reorder packets if delay is enabled. 27 // the options to delay packets and reorder packets if delay is enabled.
28 class PacketDroppingTestWriter : public QuicPacketWriterWrapper { 28 class PacketDroppingTestWriter : public QuicPacketWriterWrapper {
29 public: 29 public:
30 class Delegate { 30 class Delegate {
31 public: 31 public:
32 virtual ~Delegate() {} 32 virtual ~Delegate() {}
33 virtual void OnPacketSent(WriteResult result) = 0;
34 virtual void OnCanWrite() = 0; 33 virtual void OnCanWrite() = 0;
35 }; 34 };
36 35
37 PacketDroppingTestWriter(); 36 PacketDroppingTestWriter();
38 37
39 ~PacketDroppingTestWriter() override; 38 ~PacketDroppingTestWriter() override;
40 39
41 // Must be called before blocking, reordering or delaying (loss is OK). May be 40 // Must be called before blocking, reordering or delaying (loss is OK). May be
42 // called after connecting if the helper is not available before. 41 // called after connecting if the helper is not available before.
43 // |on_can_write| will be triggered when fake-unblocking; ownership will be 42 // |on_can_write| will be triggered when fake-unblocking; ownership will be
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 QuicByteCount buffer_size_; 158 QuicByteCount buffer_size_;
160 159
161 DISALLOW_COPY_AND_ASSIGN(PacketDroppingTestWriter); 160 DISALLOW_COPY_AND_ASSIGN(PacketDroppingTestWriter);
162 }; 161 };
163 162
164 } // namespace test 163 } // namespace test
165 } // namespace tools 164 } // namespace tools
166 } // namespace net 165 } // namespace net
167 166
168 #endif // NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_ 167 #endif // NET_TOOLS_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/mock_quic_time_wait_list_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698