Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / net / tools / quic / test_tools / quic_dispatcher_peer.h
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 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_
7
8 #include "net/tools/quic/quic_dispatcher.h"
9
10 #include "net/base/ip_endpoint.h"
11
12 namespace net {
13 namespace tools {
14
15 class QuicPacketWriterWrapper;
16
17 namespace test {
18
19 class QuicDispatcherPeer {
20  public:
21   static void SetTimeWaitListManager(
22       QuicDispatcher* dispatcher,
23       QuicTimeWaitListManager* time_wait_list_manager);
24
25   // Injects |writer| into |dispatcher| as the top level writer.
26   static void UseWriter(QuicDispatcher* dispatcher,
27                         QuicPacketWriterWrapper* writer);
28
29   static QuicPacketWriter* GetWriter(QuicDispatcher* dispatcher);
30
31   static QuicEpollConnectionHelper* GetHelper(QuicDispatcher* dispatcher);
32
33   static QuicConnection* CreateQuicConnection(
34       QuicDispatcher* dispatcher,
35       QuicConnectionId connection_id,
36       const IPEndPoint& server,
37       const IPEndPoint& client,
38       uint32 initial_flow_control_window_bytes);
39
40  private:
41   DISALLOW_COPY_AND_ASSIGN(QuicDispatcherPeer);
42 };
43
44 }  // namespace test
45 }  // namespace tools
46 }  // namespace net
47
48 #endif  // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_