| 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 12 matching lines...) Expand all Loading... |
| 23 writer->set_writer(dispatcher->writer_.release()); | 23 writer->set_writer(dispatcher->writer_.release()); |
| 24 dispatcher->writer_.reset(writer); | 24 dispatcher->writer_.reset(writer); |
| 25 } | 25 } |
| 26 | 26 |
| 27 // static | 27 // static |
| 28 QuicPacketWriter* QuicDispatcherPeer::GetWriter(QuicDispatcher* dispatcher) { | 28 QuicPacketWriter* QuicDispatcherPeer::GetWriter(QuicDispatcher* dispatcher) { |
| 29 return dispatcher->writer_.get(); | 29 return dispatcher->writer_.get(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 // static | 32 // static |
| 33 QuicCompressedCertsCache* QuicDispatcherPeer::GetCache( |
| 34 QuicDispatcher* dispatcher) { |
| 35 return dispatcher->compressed_certs_cache(); |
| 36 } |
| 37 |
| 38 // static |
| 33 QuicConnectionHelperInterface* QuicDispatcherPeer::GetHelper( | 39 QuicConnectionHelperInterface* QuicDispatcherPeer::GetHelper( |
| 34 QuicDispatcher* dispatcher) { | 40 QuicDispatcher* dispatcher) { |
| 35 return dispatcher->helper_.get(); | 41 return dispatcher->helper_.get(); |
| 36 } | 42 } |
| 37 | 43 |
| 38 // static | 44 // static |
| 39 QuicDispatcher::WriteBlockedList* QuicDispatcherPeer::GetWriteBlockedList( | 45 QuicDispatcher::WriteBlockedList* QuicDispatcherPeer::GetWriteBlockedList( |
| 40 QuicDispatcher* dispatcher) { | 46 QuicDispatcher* dispatcher) { |
| 41 return &dispatcher->write_blocked_list_; | 47 return &dispatcher->write_blocked_list_; |
| 42 } | 48 } |
| 43 | 49 |
| 44 // static | 50 // static |
| 45 QuicErrorCode QuicDispatcherPeer::GetAndClearLastError( | 51 QuicErrorCode QuicDispatcherPeer::GetAndClearLastError( |
| 46 QuicDispatcher* dispatcher) { | 52 QuicDispatcher* dispatcher) { |
| 47 QuicErrorCode ret = dispatcher->last_error_; | 53 QuicErrorCode ret = dispatcher->last_error_; |
| 48 dispatcher->last_error_ = QUIC_NO_ERROR; | 54 dispatcher->last_error_ = QUIC_NO_ERROR; |
| 49 return ret; | 55 return ret; |
| 50 } | 56 } |
| 51 | 57 |
| 52 // static | 58 // static |
| 53 const QuicDispatcher::SessionMap& QuicDispatcherPeer::session_map( | 59 const QuicDispatcher::SessionMap& QuicDispatcherPeer::session_map( |
| 54 QuicDispatcher* dispatcher) { | 60 QuicDispatcher* dispatcher) { |
| 55 return dispatcher->session_map(); | 61 return dispatcher->session_map(); |
| 56 } | 62 } |
| 57 | 63 |
| 58 } // namespace test | 64 } // namespace test |
| 59 } // namespace net | 65 } // namespace net |
| OLD | NEW |