OLD | NEW |
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 #include "net/tools/quic/test_tools/quic_dispatcher_peer.h" | 5 #include "net/tools/quic/test_tools/quic_dispatcher_peer.h" |
6 | 6 |
7 #include "net/tools/quic/quic_dispatcher.h" | 7 #include "net/tools/quic/quic_dispatcher.h" |
8 #include "net/tools/quic/quic_packet_writer_wrapper.h" | 8 #include "net/tools/quic/quic_packet_writer_wrapper.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 13 matching lines...) Expand all Loading... |
24 writer->set_writer(dispatcher->writer_.release()); | 24 writer->set_writer(dispatcher->writer_.release()); |
25 dispatcher->writer_.reset(writer); | 25 dispatcher->writer_.reset(writer); |
26 } | 26 } |
27 | 27 |
28 // static | 28 // static |
29 QuicPacketWriter* QuicDispatcherPeer::GetWriter(QuicDispatcher* dispatcher) { | 29 QuicPacketWriter* QuicDispatcherPeer::GetWriter(QuicDispatcher* dispatcher) { |
30 return dispatcher->writer_.get(); | 30 return dispatcher->writer_.get(); |
31 } | 31 } |
32 | 32 |
33 // static | 33 // static |
| 34 void QuicDispatcherPeer::SetPacketWriterFactory( |
| 35 QuicDispatcher* dispatcher, |
| 36 QuicDispatcher::PacketWriterFactory* packet_writer_factory) { |
| 37 dispatcher->packet_writer_factory_.reset(packet_writer_factory); |
| 38 } |
| 39 |
| 40 // static |
34 QuicEpollConnectionHelper* QuicDispatcherPeer::GetHelper( | 41 QuicEpollConnectionHelper* QuicDispatcherPeer::GetHelper( |
35 QuicDispatcher* dispatcher) { | 42 QuicDispatcher* dispatcher) { |
36 return dispatcher->helper_.get(); | 43 return dispatcher->helper_.get(); |
37 } | 44 } |
38 | 45 |
39 // static | 46 // static |
40 QuicConnection* QuicDispatcherPeer::CreateQuicConnection( | 47 QuicConnection* QuicDispatcherPeer::CreateQuicConnection( |
41 QuicDispatcher* dispatcher, | 48 QuicDispatcher* dispatcher, |
42 QuicConnectionId connection_id, | 49 QuicConnectionId connection_id, |
43 const IPEndPoint& server, | 50 const IPEndPoint& server, |
44 const IPEndPoint& client) { | 51 const IPEndPoint& client) { |
45 return dispatcher->CreateQuicConnection(connection_id, | 52 return dispatcher->CreateQuicConnection(connection_id, |
46 server, | 53 server, |
47 client); | 54 client); |
48 } | 55 } |
49 | 56 |
50 // static | 57 // static |
51 QuicDispatcher::WriteBlockedList* QuicDispatcherPeer::GetWriteBlockedList( | 58 QuicDispatcher::WriteBlockedList* QuicDispatcherPeer::GetWriteBlockedList( |
52 QuicDispatcher* dispatcher) { | 59 QuicDispatcher* dispatcher) { |
53 return &dispatcher->write_blocked_list_; | 60 return &dispatcher->write_blocked_list_; |
54 } | 61 } |
55 | 62 |
56 } // namespace test | 63 } // namespace test |
57 } // namespace tools | 64 } // namespace tools |
58 } // namespace net | 65 } // namespace net |
OLD | NEW |