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

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

Issue 467963002: Refactoring: Create per-connection packet writers in QuicDispatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation Created 6 years, 4 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_QUIC_DISPATCHER_PEER_H_ 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_ 6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_
7 7
8 #include "net/tools/quic/quic_dispatcher.h" 8 #include "net/tools/quic/quic_dispatcher.h"
9 9
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
11 11
12 namespace net { 12 namespace net {
13 namespace tools { 13 namespace tools {
14 14
15 class QuicPacketWriterWrapper; 15 class QuicPacketWriterWrapper;
16 16
17 namespace test { 17 namespace test {
18 18
19 class QuicDispatcherPeer { 19 class QuicDispatcherPeer {
20 public: 20 public:
21 static void SetTimeWaitListManager( 21 static void SetTimeWaitListManager(
22 QuicDispatcher* dispatcher, 22 QuicDispatcher* dispatcher,
23 QuicTimeWaitListManager* time_wait_list_manager); 23 QuicTimeWaitListManager* time_wait_list_manager);
24 24
25 // Injects |writer| into |dispatcher| as the top level writer. 25 // Injects |writer| into |dispatcher| as the shared writer.
26 static void UseWriter(QuicDispatcher* dispatcher, 26 static void UseWriter(QuicDispatcher* dispatcher,
27 QuicPacketWriterWrapper* writer); 27 QuicPacketWriterWrapper* writer);
28 28
29 static QuicPacketWriter* GetWriter(QuicDispatcher* dispatcher); 29 static QuicPacketWriter* GetWriter(QuicDispatcher* dispatcher);
30 30
31 static void SetPacketWriterFactory(
32 QuicDispatcher* dispatcher,
33 QuicDispatcher::PacketWriterFactory* packet_writer_factory);
34
31 static QuicEpollConnectionHelper* GetHelper(QuicDispatcher* dispatcher); 35 static QuicEpollConnectionHelper* GetHelper(QuicDispatcher* dispatcher);
32 36
33 static QuicConnection* CreateQuicConnection( 37 static QuicConnection* CreateQuicConnection(
34 QuicDispatcher* dispatcher, 38 QuicDispatcher* dispatcher,
35 QuicConnectionId connection_id, 39 QuicConnectionId connection_id,
36 const IPEndPoint& server, 40 const IPEndPoint& server,
37 const IPEndPoint& client); 41 const IPEndPoint& client);
38 42
39 static QuicDispatcher::WriteBlockedList* GetWriteBlockedList( 43 static QuicDispatcher::WriteBlockedList* GetWriteBlockedList(
40 QuicDispatcher* dispatcher); 44 QuicDispatcher* dispatcher);
41 45
42 private: 46 private:
43 DISALLOW_COPY_AND_ASSIGN(QuicDispatcherPeer); 47 DISALLOW_COPY_AND_ASSIGN(QuicDispatcherPeer);
44 }; 48 };
45 49
46 } // namespace test 50 } // namespace test
47 } // namespace tools 51 } // namespace tools
48 } // namespace net 52 } // namespace net
49 53
50 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_ 54 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698