Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / net / quic / test_tools / quic_framer_peer.h
blobe33648ba44b523290119de78cc287fa97dbcc9b3
1 // Copyright (c) 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.
5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_FRAMER_PEER_H_
6 #define NET_QUIC_TEST_TOOLS_QUIC_FRAMER_PEER_H_
8 #include "net/quic/crypto/quic_encrypter.h"
9 #include "net/quic/quic_framer.h"
10 #include "net/quic/quic_protocol.h"
12 namespace net {
14 namespace test {
16 class QuicFramerPeer {
17 public:
18 static QuicPacketNumber CalculatePacketNumberFromWire(
19 QuicFramer* framer,
20 QuicPacketNumberLength packet_number_length,
21 QuicPacketNumber packet_packet_number);
22 static void SetLastSerializedConnectionId(QuicFramer* framer,
23 QuicConnectionId connection_id);
24 static void SetLastPacketNumber(QuicFramer* framer,
25 QuicPacketNumber packet_packet_number);
26 static void SetPerspective(QuicFramer* framer, Perspective perspective);
28 // SwapCrypters exchanges the state of the crypters of |framer1| with
29 // |framer2|.
30 static void SwapCrypters(QuicFramer* framer1, QuicFramer* framer2);
32 static QuicEncrypter* GetEncrypter(QuicFramer* framer, EncryptionLevel level);
34 private:
35 DISALLOW_COPY_AND_ASSIGN(QuicFramerPeer);
38 } // namespace test
40 } // namespace net
42 #endif // NET_QUIC_TEST_TOOLS_QUIC_FRAMER_PEER_H_