Add QpackEncoder::SetMaximumDynamicTableCapacity() and SetMaximumBlockedStreams() and call them when corresponding settings are received.
gfe-relnote: n/a, change to QUIC v99-only code. Protected by existing disabled gfe2_reloadable_flag_quic_enable_version_99.
PiperOrigin-RevId: 261579634
Change-Id: Ice97e1d26210c622fbbf6c6894901ed6b44c01ca
diff --git a/quic/test_tools/qpack_encoder_peer.cc b/quic/test_tools/qpack_encoder_peer.cc
new file mode 100644
index 0000000..4e4bb52
--- /dev/null
+++ b/quic/test_tools/qpack_encoder_peer.cc
@@ -0,0 +1,24 @@
+// Copyright (c) 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/third_party/quiche/src/quic/test_tools/qpack_encoder_peer.h"
+
+#include "net/third_party/quiche/src/quic/core/qpack/qpack_encoder.h"
+
+namespace quic {
+namespace test {
+
+// static
+QpackHeaderTable* QpackEncoderPeer::header_table(QpackEncoder* encoder) {
+ return &encoder->header_table_;
+}
+
+// static
+uint64_t QpackEncoderPeer::maximum_blocked_streams(
+ const QpackEncoder* encoder) {
+ return encoder->maximum_blocked_streams_;
+}
+
+} // namespace test
+} // namespace quic
diff --git a/quic/test_tools/qpack_encoder_peer.h b/quic/test_tools/qpack_encoder_peer.h
new file mode 100644
index 0000000..b8a8cc7
--- /dev/null
+++ b/quic/test_tools/qpack_encoder_peer.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef QUICHE_QUIC_TEST_TOOLS_QPACK_ENCODER_PEER_H_
+#define QUICHE_QUIC_TEST_TOOLS_QPACK_ENCODER_PEER_H_
+
+#include <cstdint>
+
+namespace quic {
+
+class QpackEncoder;
+class QpackHeaderTable;
+
+namespace test {
+
+class QpackEncoderPeer {
+ public:
+ QpackEncoderPeer() = delete;
+
+ static QpackHeaderTable* header_table(QpackEncoder* encoder);
+ static uint64_t maximum_blocked_streams(const QpackEncoder* encoder);
+};
+
+} // namespace test
+
+} // namespace quic
+
+#endif // QUICHE_QUIC_TEST_TOOLS_QPACK_ENCODER_PEER_H_
diff --git a/quic/test_tools/qpack_header_table_peer.cc b/quic/test_tools/qpack_header_table_peer.cc
new file mode 100644
index 0000000..37c2961
--- /dev/null
+++ b/quic/test_tools/qpack_header_table_peer.cc
@@ -0,0 +1,19 @@
+// Copyright (c) 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/third_party/quiche/src/quic/test_tools/qpack_header_table_peer.h"
+
+#include "net/third_party/quiche/src/quic/core/qpack/qpack_header_table.h"
+
+namespace quic {
+namespace test {
+
+// static
+uint64_t QpackHeaderTablePeer::maximum_dynamic_table_capacity(
+ const QpackHeaderTable* header_table) {
+ return header_table->maximum_dynamic_table_capacity_;
+}
+
+} // namespace test
+} // namespace quic
diff --git a/quic/test_tools/qpack_header_table_peer.h b/quic/test_tools/qpack_header_table_peer.h
new file mode 100644
index 0000000..a73859c
--- /dev/null
+++ b/quic/test_tools/qpack_header_table_peer.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef QUICHE_QUIC_TEST_TOOLS_QPACK_HEADER_TABLE_PEER_H_
+#define QUICHE_QUIC_TEST_TOOLS_QPACK_HEADER_TABLE_PEER_H_
+
+#include <cstdint>
+
+namespace quic {
+
+class QpackHeaderTable;
+
+namespace test {
+
+class QpackHeaderTablePeer {
+ public:
+ QpackHeaderTablePeer() = delete;
+
+ static uint64_t maximum_dynamic_table_capacity(
+ const QpackHeaderTable* header_table);
+};
+
+} // namespace test
+
+} // namespace quic
+
+#endif // QUICHE_QUIC_TEST_TOOLS_QPACK_HEADER_TABLE_PEER_H_