QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 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 | #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 | |
| 9 | namespace quic { |
| 10 | |
bnc | 331385e | 2019-09-11 05:02:16 -0700 | [diff] [blame] | 11 | QuicSimpleClientSession::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 team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 32 | std::unique_ptr<QuicSpdyClientStream> |
| 33 | QuicSimpleClientSession::CreateClientStream() { |
vasilvv | 0fc587f | 2019-09-06 13:33:08 -0700 | [diff] [blame] | 34 | return std::make_unique<QuicSimpleClientStream>( |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 35 | GetNextOutgoingBidirectionalStreamId(), this, BIDIRECTIONAL, |
| 36 | drop_response_body_); |
| 37 | } |
| 38 | |
| 39 | } // namespace quic |