blob: 30c9b22836d2f87b4d9c659d2a2b37a28989e33d [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// Copyright (c) 2018 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 QUICHE_QUIC_TEST_TOOLS_QUIC_SERVER_SESSION_BASE_PEER_H_
6#define QUICHE_QUIC_TEST_TOOLS_QUIC_SERVER_SESSION_BASE_PEER_H_
7
8#include "net/third_party/quiche/src/quic/core/http/quic_server_session_base.h"
9
10#include "net/third_party/quiche/src/quic/core/quic_utils.h"
11
12namespace quic {
13namespace test {
14
15class QuicServerSessionBasePeer {
16 public:
17 static QuicStream* GetOrCreateDynamicStream(QuicServerSessionBase* s,
18 QuicStreamId id) {
19 return s->GetOrCreateDynamicStream(id);
20 }
21 static void SetCryptoStream(QuicServerSessionBase* s,
22 QuicCryptoServerStream* crypto_stream) {
23 s->crypto_stream_.reset(crypto_stream);
24 s->RegisterStaticStream(
25 QuicUtils::GetCryptoStreamId(s->connection()->transport_version()),
26 crypto_stream);
27 }
28 static bool IsBandwidthResumptionEnabled(QuicServerSessionBase* s) {
29 return s->bandwidth_resumption_enabled_;
30 }
31};
32
33} // namespace test
34
35} // namespace quic
36
37#endif // QUICHE_QUIC_TEST_TOOLS_QUIC_SERVER_SESSION_BASE_PEER_H_