blob: faaddcb2187342a7b5383693906acf06d9e9eb6f [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
bnce42f7ad2019-10-25 17:46:31 -07005#include "net/third_party/quiche/src/quic/test_tools/qpack/qpack_test_utils.h"
QUICHE teama6ef0a62019-03-07 20:34:33 -05006
7#include <limits>
8
9namespace quic {
10namespace test {
11
12FragmentSizeGenerator FragmentModeToFragmentSizeGenerator(
13 FragmentMode fragment_mode) {
14 switch (fragment_mode) {
15 case FragmentMode::kSingleChunk:
16 return []() { return std::numeric_limits<size_t>::max(); };
17 case FragmentMode::kOctetByOctet:
18 return []() { return 1; };
19 }
20}
21
22} // namespace test
23} // namespace quic