Add QUICHE_EXPORT_PRIVATE as necessary.

The presubmit requirement blocks my efforts to clang-format all of QUICHE.

PiperOrigin-RevId: 441525895
diff --git a/quiche/http2/decoder/payload_decoders/payload_decoder_base_test_util.h b/quiche/http2/decoder/payload_decoders/payload_decoder_base_test_util.h
index 5eead55..5fc9a9f 100644
--- a/quiche/http2/decoder/payload_decoders/payload_decoder_base_test_util.h
+++ b/quiche/http2/decoder/payload_decoders/payload_decoder_base_test_util.h
@@ -23,13 +23,14 @@
 #include "quiche/http2/test_tools/frame_parts.h"
 #include "quiche/http2/tools/http2_frame_builder.h"
 #include "quiche/http2/tools/random_decoder_test.h"
+#include "quiche/common/platform/api/quiche_export.h"
 
 namespace http2 {
 namespace test {
 
 // Base class for tests of payload decoders. Below this there is a templated
 // sub-class that adds a bunch of type specific features.
-class PayloadDecoderBaseTest : public RandomDecoderTest {
+class QUICHE_EXPORT_PRIVATE PayloadDecoderBaseTest : public RandomDecoderTest {
  protected:
   PayloadDecoderBaseTest();
 
@@ -109,11 +110,10 @@
 // of Http2FrameDecoderListenerInterface to be used during decoding.
 // Typically Listener is a sub-class of FramePartsCollector.
 // SupportedFrameType is set to false only for UnknownPayloadDecoder.
-template <class Decoder,
-          class DecoderPeer,
-          class Listener,
+template <class Decoder, class DecoderPeer, class Listener,
           bool SupportedFrameType = true>
-class AbstractPayloadDecoderTest : public PayloadDecoderBaseTest {
+class QUICHE_EXPORT_PRIVATE AbstractPayloadDecoderTest
+    : public PayloadDecoderBaseTest {
  protected:
   // An ApproveSize function returns true to approve decoding the specified
   // size of payload, else false to skip that size. Typically used for negative
diff --git a/quiche/http2/hpack/decoder/hpack_block_collector.h b/quiche/http2/hpack/decoder/hpack_block_collector.h
index ccd11c6..8e5850b 100644
--- a/quiche/http2/hpack/decoder/hpack_block_collector.h
+++ b/quiche/http2/hpack/decoder/hpack_block_collector.h
@@ -24,11 +24,13 @@
 #include "quiche/http2/hpack/http2_hpack_constants.h"
 #include "quiche/http2/hpack/tools/hpack_block_builder.h"
 #include "quiche/http2/test_tools/http2_random.h"
+#include "quiche/common/platform/api/quiche_export.h"
 
 namespace http2 {
 namespace test {
 
-class HpackBlockCollector : public HpackEntryDecoderListener {
+class QUICHE_EXPORT_PRIVATE HpackBlockCollector
+    : public HpackEntryDecoderListener {
  public:
   HpackBlockCollector();
   HpackBlockCollector(const HpackBlockCollector& other);
diff --git a/quiche/http2/hpack/decoder/hpack_entry_collector.h b/quiche/http2/hpack/decoder/hpack_entry_collector.h
index d4743fa..2ceec1f 100644
--- a/quiche/http2/hpack/decoder/hpack_entry_collector.h
+++ b/quiche/http2/hpack/decoder/hpack_entry_collector.h
@@ -20,12 +20,14 @@
 #include "quiche/http2/hpack/decoder/hpack_string_collector.h"
 #include "quiche/http2/hpack/http2_hpack_constants.h"
 #include "quiche/http2/hpack/tools/hpack_block_builder.h"
+#include "quiche/common/platform/api/quiche_export.h"
 #include "quiche/common/platform/api/quiche_test.h"
 
 namespace http2 {
 namespace test {
 
-class HpackEntryCollector : public HpackEntryDecoderListener {
+class QUICHE_EXPORT_PRIVATE HpackEntryCollector
+    : public HpackEntryDecoderListener {
  public:
   HpackEntryCollector();
   HpackEntryCollector(const HpackEntryCollector& other);
@@ -145,9 +147,12 @@
   bool ended_ = false;
 };
 
-bool operator==(const HpackEntryCollector& a, const HpackEntryCollector& b);
-bool operator!=(const HpackEntryCollector& a, const HpackEntryCollector& b);
-std::ostream& operator<<(std::ostream& out, const HpackEntryCollector& v);
+QUICHE_EXPORT_PRIVATE bool operator==(const HpackEntryCollector& a,
+                                      const HpackEntryCollector& b);
+QUICHE_EXPORT_PRIVATE bool operator!=(const HpackEntryCollector& a,
+                                      const HpackEntryCollector& b);
+QUICHE_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
+                                               const HpackEntryCollector& v);
 
 }  // namespace test
 }  // namespace http2
diff --git a/quiche/http2/hpack/decoder/hpack_whole_entry_listener.h b/quiche/http2/hpack/decoder/hpack_whole_entry_listener.h
index 0e710ab..90c6f9d 100644
--- a/quiche/http2/hpack/decoder/hpack_whole_entry_listener.h
+++ b/quiche/http2/hpack/decoder/hpack_whole_entry_listener.h
@@ -57,7 +57,8 @@
 
 // A no-op implementation of HpackWholeEntryDecoderListener, useful for ignoring
 // callbacks once an error is detected.
-class HpackWholeEntryNoOpListener : public HpackWholeEntryListener {
+class QUICHE_EXPORT_PRIVATE HpackWholeEntryNoOpListener
+    : public HpackWholeEntryListener {
  public:
   ~HpackWholeEntryNoOpListener() override;
 
diff --git a/quiche/http2/hpack/tools/hpack_block_builder.h b/quiche/http2/hpack/tools/hpack_block_builder.h
index ef5f3c7..56330dd 100644
--- a/quiche/http2/hpack/tools/hpack_block_builder.h
+++ b/quiche/http2/hpack/tools/hpack_block_builder.h
@@ -23,12 +23,13 @@
 
 #include "absl/strings/string_view.h"
 #include "quiche/http2/hpack/http2_hpack_constants.h"
+#include "quiche/common/platform/api/quiche_export.h"
 #include "quiche/common/platform/api/quiche_test.h"
 
 namespace http2 {
 namespace test {
 
-class HpackBlockBuilder {
+class QUICHE_EXPORT_PRIVATE HpackBlockBuilder {
  public:
   explicit HpackBlockBuilder(absl::string_view initial_contents)
       : buffer_(initial_contents.data(), initial_contents.size()) {}
diff --git a/quiche/http2/test_tools/frame_parts.h b/quiche/http2/test_tools/frame_parts.h
index 8f1bea9..30ce76f 100644
--- a/quiche/http2/test_tools/frame_parts.h
+++ b/quiche/http2/test_tools/frame_parts.h
@@ -22,12 +22,13 @@
 #include "quiche/http2/http2_constants.h"
 #include "quiche/http2/http2_structures.h"
 #include "quiche/http2/platform/api/http2_logging.h"
+#include "quiche/common/platform/api/quiche_export.h"
 #include "quiche/common/platform/api/quiche_test.h"
 
 namespace http2 {
 namespace test {
 
-class FrameParts : public Http2FrameDecoderListener {
+class QUICHE_EXPORT_PRIVATE FrameParts : public Http2FrameDecoderListener {
  public:
   // The first callback for every type of frame includes the frame header; this
   // is the only constructor used during decoding of a frame.
@@ -251,7 +252,8 @@
   bool got_end_callback_ = false;
 };
 
-std::ostream& operator<<(std::ostream& out, const FrameParts& v);
+QUICHE_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
+                                               const FrameParts& v);
 
 }  // namespace test
 }  // namespace http2
diff --git a/quiche/http2/test_tools/frame_parts_collector_listener.h b/quiche/http2/test_tools/frame_parts_collector_listener.h
index c8be4a5..e54ecdf 100644
--- a/quiche/http2/test_tools/frame_parts_collector_listener.h
+++ b/quiche/http2/test_tools/frame_parts_collector_listener.h
@@ -20,11 +20,13 @@
 #include "quiche/http2/http2_constants.h"
 #include "quiche/http2/http2_structures.h"
 #include "quiche/http2/test_tools/frame_parts_collector.h"
+#include "quiche/common/platform/api/quiche_export.h"
 
 namespace http2 {
 namespace test {
 
-class FramePartsCollectorListener : public FramePartsCollector {
+class QUICHE_EXPORT_PRIVATE FramePartsCollectorListener
+    : public FramePartsCollector {
  public:
   FramePartsCollectorListener() {}
   ~FramePartsCollectorListener() override {}
diff --git a/quiche/http2/tools/random_decoder_test.h b/quiche/http2/tools/random_decoder_test.h
index 9b4b102..cd23d9f 100644
--- a/quiche/http2/tools/random_decoder_test.h
+++ b/quiche/http2/tools/random_decoder_test.h
@@ -22,6 +22,7 @@
 #include "quiche/http2/decoder/decode_status.h"
 #include "quiche/http2/platform/api/http2_logging.h"
 #include "quiche/http2/test_tools/http2_random.h"
+#include "quiche/common/platform/api/quiche_export.h"
 #include "quiche/common/platform/api/quiche_test.h"
 #include "quiche/common/platform/api/quiche_test_helpers.h"
 
diff --git a/quiche/spdy/core/array_output_buffer.h b/quiche/spdy/core/array_output_buffer.h
index 6387c81..002c30a 100644
--- a/quiche/spdy/core/array_output_buffer.h
+++ b/quiche/spdy/core/array_output_buffer.h
@@ -6,11 +6,13 @@
 #define QUICHE_SPDY_CORE_ARRAY_OUTPUT_BUFFER_H_
 
 #include <cstddef>
+
+#include "quiche/common/platform/api/quiche_export.h"
 #include "quiche/spdy/core/zero_copy_output_buffer.h"
 
 namespace spdy {
 
-class ArrayOutputBuffer : public ZeroCopyOutputBuffer {
+class QUICHE_EXPORT_PRIVATE ArrayOutputBuffer : public ZeroCopyOutputBuffer {
  public:
   // |buffer| is pointed to the output to write to, and |size| is the capacity
   // of the output.
diff --git a/quiche/spdy/core/spdy_intrusive_list.h b/quiche/spdy/core/spdy_intrusive_list.h
index 3af2053..405ab28 100644
--- a/quiche/spdy/core/spdy_intrusive_list.h
+++ b/quiche/spdy/core/spdy_intrusive_list.h
@@ -86,14 +86,17 @@
 // Note that SpdyIntrusiveList::size() runs in O(N) time.
 
 #include <stddef.h>
+
 #include <iterator>
 
+#include "quiche/common/platform/api/quiche_export.h"
 
 namespace spdy {
 
 template <typename T, typename ListID> class SpdyIntrusiveList;
 
-template <typename T, typename ListID = void> class SpdyIntrusiveLink {
+template <typename T, typename ListID = void>
+class QUICHE_EXPORT_PRIVATE SpdyIntrusiveLink {
  protected:
   // We declare the constructor protected so that only derived types and the
   // befriended list can construct this.
@@ -117,7 +120,8 @@
   SpdyIntrusiveLink* prev_;
 };
 
-template <typename T, typename ListID = void> class SpdyIntrusiveList {
+template <typename T, typename ListID = void>
+class QUICHE_EXPORT_PRIVATE SpdyIntrusiveList {
   template <typename QualifiedT, typename QualifiedLinkT> class iterator_impl;
 
  public:
@@ -262,8 +266,8 @@
   // variant of T and the matching qualified link type. Essentially, QualifiedT
   // will either be 'T' or 'const T', the latter for a const_iterator.
   template <typename QualifiedT, typename QualifiedLinkT>
-  class iterator_impl : public std::iterator<std::bidirectional_iterator_tag,
-                                             QualifiedT> {
+  class QUICHE_EXPORT_PRIVATE iterator_impl
+      : public std::iterator<std::bidirectional_iterator_tag, QualifiedT> {
    public:
     typedef std::iterator<std::bidirectional_iterator_tag, QualifiedT> base;
 
diff --git a/quiche/spdy/core/spdy_no_op_visitor.h b/quiche/spdy/core/spdy_no_op_visitor.h
index 3adc02b..65ab142 100644
--- a/quiche/spdy/core/spdy_no_op_visitor.h
+++ b/quiche/spdy/core/spdy_no_op_visitor.h
@@ -12,14 +12,16 @@
 #include <cstdint>
 
 #include "absl/strings/string_view.h"
+#include "quiche/common/platform/api/quiche_export.h"
 #include "quiche/spdy/core/http2_frame_decoder_adapter.h"
 #include "quiche/spdy/core/spdy_protocol.h"
 
 namespace spdy {
 
-class SpdyNoOpVisitor : public SpdyFramerVisitorInterface,
-                        public SpdyFramerDebugVisitorInterface,
-                        public SpdyHeadersHandlerInterface {
+class QUICHE_EXPORT_PRIVATE SpdyNoOpVisitor
+    : public SpdyFramerVisitorInterface,
+      public SpdyFramerDebugVisitorInterface,
+      public SpdyHeadersHandlerInterface {
  public:
   SpdyNoOpVisitor();
   ~SpdyNoOpVisitor() override;