1 // 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 "quiche/quic/core/http/quic_server_session_base.h"
9 #include "quiche/quic/core/quic_utils.h"
10 
11 namespace quic {
12 namespace test {
13 
14 class QuicServerSessionBasePeer {
15  public:
GetOrCreateStream(QuicServerSessionBase * s,QuicStreamId id)16   static QuicStream* GetOrCreateStream(QuicServerSessionBase* s,
17                                        QuicStreamId id) {
18     return s->GetOrCreateStream(id);
19   }
SetCryptoStream(QuicServerSessionBase * s,QuicCryptoServerStreamBase * crypto_stream)20   static void SetCryptoStream(QuicServerSessionBase* s,
21                               QuicCryptoServerStreamBase* crypto_stream) {
22     s->crypto_stream_.reset(crypto_stream);
23   }
IsBandwidthResumptionEnabled(QuicServerSessionBase * s)24   static bool IsBandwidthResumptionEnabled(QuicServerSessionBase* s) {
25     return s->bandwidth_resumption_enabled_;
26   }
27 };
28 
29 }  // namespace test
30 
31 }  // namespace quic
32 
33 #endif  // QUICHE_QUIC_TEST_TOOLS_QUIC_SERVER_SESSION_BASE_PEER_H_
34