blob: f39d8fa46daffb2c7ca5cc8ec0d5ed498ac95c44 [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#include "net/third_party/quiche/src/quic/tools/quic_simple_client_session.h"
6
7#include "net/third_party/quiche/src/quic/platform/api/quic_ptr_util.h"
8
9namespace quic {
10
bnc331385e2019-09-11 05:02:16 -070011QuicSimpleClientSession::QuicSimpleClientSession(
12 const QuicConfig& config,
13 const ParsedQuicVersionVector& supported_versions,
14 QuicConnection* connection,
15 const QuicServerId& server_id,
16 QuicCryptoClientConfig* crypto_config,
17 QuicClientPushPromiseIndex* push_promise_index,
18 bool drop_response_body)
19 : QuicSpdyClientSession(config,
20 supported_versions,
21 connection,
22 server_id,
23 crypto_config,
24 push_promise_index),
25 drop_response_body_(drop_response_body) {
26 // Do not use the QPACK dynamic table in tests to avoid flakiness due to the
27 // uncertain order of receiving the SETTINGS frame and sending headers.
28 set_qpack_maximum_dynamic_table_capacity(0);
29 set_qpack_maximum_blocked_streams(0);
30}
31
QUICHE teama6ef0a62019-03-07 20:34:33 -050032std::unique_ptr<QuicSpdyClientStream>
33QuicSimpleClientSession::CreateClientStream() {
vasilvv0fc587f2019-09-06 13:33:08 -070034 return std::make_unique<QuicSimpleClientStream>(
QUICHE teama6ef0a62019-03-07 20:34:33 -050035 GetNextOutgoingBidirectionalStreamId(), this, BIDIRECTIONAL,
36 drop_response_body_);
37}
38
39} // namespace quic