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 3 // found in the LICENSE file. 4 5 #include "net/tools/quic/test_tools/quic_dispatcher_peer.h" 6 7 #include "net/tools/quic/quic_dispatcher.h" 8 9 using net::test::QuicTestWriter; 10 11 namespace net { 12 namespace tools { 13 namespace test { 14 15 // static SetTimeWaitListManager(QuicDispatcher * dispatcher,QuicTimeWaitListManager * time_wait_list_manager)16void QuicDispatcherPeer::SetTimeWaitListManager( 17 QuicDispatcher* dispatcher, 18 QuicTimeWaitListManager* time_wait_list_manager) { 19 dispatcher->time_wait_list_manager_.reset(time_wait_list_manager); 20 } 21 22 // static SetWriteBlocked(QuicDispatcher * dispatcher)23void QuicDispatcherPeer::SetWriteBlocked(QuicDispatcher* dispatcher) { 24 dispatcher->write_blocked_ = true; 25 } 26 27 // static UseWriter(QuicDispatcher * dispatcher,QuicTestWriter * writer)28void QuicDispatcherPeer::UseWriter(QuicDispatcher* dispatcher, 29 QuicTestWriter* writer) { 30 writer->set_writer(dispatcher->writer_.release()); 31 dispatcher->writer_.reset(writer); 32 } 33 34 // static GetWriter(QuicDispatcher * dispatcher)35QuicPacketWriter* QuicDispatcherPeer::GetWriter(QuicDispatcher* dispatcher) { 36 return dispatcher->writer_.get(); 37 } 38 39 // static GetHelper(QuicDispatcher * dispatcher)40QuicEpollConnectionHelper* QuicDispatcherPeer::GetHelper( 41 QuicDispatcher* dispatcher) { 42 return dispatcher->helper_.get(); 43 } 44 45 } // namespace test 46 } // namespace tools 47 } // namespace net 48