Add QUICHE_EXPORT_PRIVATE and QUICHE_NO_EXPORT as necessary.
This is to make presubmit rules in METADATA pass, otherwise unrelated changes to
these files will be blocked.
PiperOrigin-RevId: 442603626
diff --git a/quiche/common/platform/default/quiche_platform_impl/quiche_iovec_impl.h b/quiche/common/platform/default/quiche_platform_impl/quiche_iovec_impl.h
index 32f0678..51bebc4 100644
--- a/quiche/common/platform/default/quiche_platform_impl/quiche_iovec_impl.h
+++ b/quiche/common/platform/default/quiche_platform_impl/quiche_iovec_impl.h
@@ -10,7 +10,7 @@
#if defined(_WIN32)
// See <https://pubs.opengroup.org/onlinepubs/009604599/basedefs/sys/uio.h.html>
-struct QUICHE_EXPORT_PRIVAATE iovec {
+struct QUICHE_EXPORT_PRIVATE iovec {
void* iov_base;
size_t iov_len;
};
diff --git a/quiche/common/platform/default/quiche_platform_impl/quiche_logging_impl.h b/quiche/common/platform/default/quiche_platform_impl/quiche_logging_impl.h
index 4b414e7..fab7f9c 100644
--- a/quiche/common/platform/default/quiche_platform_impl/quiche_logging_impl.h
+++ b/quiche/common/platform/default/quiche_platform_impl/quiche_logging_impl.h
@@ -16,12 +16,13 @@
#include <string>
#include "absl/base/attributes.h"
+#include "quiche/common/platform/api/quiche_export.h"
namespace quiche {
// NoopLogSink provides a log sink that does not put the data that it logs
// anywhere.
-class NoopLogSink {
+class QUICHE_EXPORT_PRIVATE NoopLogSink {
public:
NoopLogSink() {}
@@ -43,7 +44,7 @@
// We need to actually implement LOG(FATAL), otherwise some functions will fail
// to compile due to the "failed to return value from non-void function" error.
-class FatalLogSink : public NoopLogSink {
+class QUICHE_EXPORT_PRIVATE FatalLogSink : public NoopLogSink {
public:
ABSL_ATTRIBUTE_NORETURN ~FatalLogSink() { abort(); }
};
diff --git a/quiche/common/quiche_circular_deque.h b/quiche/common/quiche_circular_deque.h
index bd319b1..8f17e96 100644
--- a/quiche/common/quiche_circular_deque.h
+++ b/quiche/common/quiche_circular_deque.h
@@ -733,7 +733,7 @@
// with the fields we had to store anyway, via inheriting from the allocator,
// so this allocator instance doesn't consume any storage when its type has no
// data members.
- struct AllocatorAndData : private allocator_type {
+ struct QUICHE_EXPORT_PRIVATE AllocatorAndData : private allocator_type {
explicit AllocatorAndData(const allocator_type& alloc)
: allocator_type(alloc) {}
diff --git a/quiche/http2/decoder/frame_decoder_state_test_util.h b/quiche/http2/decoder/frame_decoder_state_test_util.h
index b690040..13a08d3 100644
--- a/quiche/http2/decoder/frame_decoder_state_test_util.h
+++ b/quiche/http2/decoder/frame_decoder_state_test_util.h
@@ -8,11 +8,12 @@
#include "quiche/http2/decoder/frame_decoder_state.h"
#include "quiche/http2/http2_structures.h"
#include "quiche/http2/tools/random_decoder_test.h"
+#include "quiche/common/platform/api/quiche_export.h"
namespace http2 {
namespace test {
-class FrameDecoderStatePeer {
+class QUICHE_NO_EXPORT FrameDecoderStatePeer {
public:
// Randomizes (i.e. corrupts) the fields of the FrameDecoderState.
// PayloadDecoderBaseTest::StartDecoding calls this before passing the first
diff --git a/quiche/http2/decoder/http2_frame_decoder_listener.h b/quiche/http2/decoder/http2_frame_decoder_listener.h
index ad6bc5f..13f1784 100644
--- a/quiche/http2/decoder/http2_frame_decoder_listener.h
+++ b/quiche/http2/decoder/http2_frame_decoder_listener.h
@@ -33,12 +33,13 @@
#include "quiche/http2/http2_constants.h"
#include "quiche/http2/http2_structures.h"
+#include "quiche/common/platform/api/quiche_export.h"
namespace http2 {
// TODO(jamessynge): Consider sorting the methods by frequency of call, if that
// helps at all.
-class Http2FrameDecoderListener {
+class QUICHE_EXPORT_PRIVATE Http2FrameDecoderListener {
public:
Http2FrameDecoderListener() {}
virtual ~Http2FrameDecoderListener() {}
@@ -315,7 +316,8 @@
};
// Do nothing for each call. Useful for ignoring a frame that is invalid.
-class Http2FrameDecoderNoOpListener : public Http2FrameDecoderListener {
+class QUICHE_EXPORT_PRIVATE Http2FrameDecoderNoOpListener
+ : public Http2FrameDecoderListener {
public:
Http2FrameDecoderNoOpListener() {}
~Http2FrameDecoderNoOpListener() override {}
diff --git a/quiche/http2/decoder/http2_frame_decoder_listener_test_util.h b/quiche/http2/decoder/http2_frame_decoder_listener_test_util.h
index a109d1d..86beb04 100644
--- a/quiche/http2/decoder/http2_frame_decoder_listener_test_util.h
+++ b/quiche/http2/decoder/http2_frame_decoder_listener_test_util.h
@@ -12,12 +12,14 @@
#include "quiche/http2/decoder/http2_frame_decoder_listener.h"
#include "quiche/http2/http2_constants.h"
#include "quiche/http2/http2_structures.h"
+#include "quiche/common/platform/api/quiche_export.h"
namespace http2 {
// Fail if any of the methods are called. Allows a test to override only the
// expected calls.
-class FailingHttp2FrameDecoderListener : public Http2FrameDecoderListener {
+class QUICHE_NO_EXPORT FailingHttp2FrameDecoderListener
+ : public Http2FrameDecoderListener {
public:
FailingHttp2FrameDecoderListener();
~FailingHttp2FrameDecoderListener() override;
@@ -82,7 +84,8 @@
// HTTP2_VLOG's all the calls it receives, and forwards those calls to an
// optional listener.
-class LoggingHttp2FrameDecoderListener : public Http2FrameDecoderListener {
+class QUICHE_NO_EXPORT LoggingHttp2FrameDecoderListener
+ : public Http2FrameDecoderListener {
public:
LoggingHttp2FrameDecoderListener();
explicit LoggingHttp2FrameDecoderListener(Http2FrameDecoderListener* wrapped);
diff --git a/quiche/http2/decoder/http2_structure_decoder_test_util.h b/quiche/http2/decoder/http2_structure_decoder_test_util.h
index 32145aa..eb9105d 100644
--- a/quiche/http2/decoder/http2_structure_decoder_test_util.h
+++ b/quiche/http2/decoder/http2_structure_decoder_test_util.h
@@ -6,13 +6,13 @@
#define QUICHE_HTTP2_DECODER_HTTP2_STRUCTURE_DECODER_TEST_UTIL_H_
#include "quiche/http2/decoder/http2_structure_decoder.h"
-
#include "quiche/http2/test_tools/http2_random.h"
+#include "quiche/common/platform/api/quiche_export.h"
namespace http2 {
namespace test {
-class Http2StructureDecoderPeer {
+class QUICHE_NO_EXPORT Http2StructureDecoderPeer {
public:
// Overwrite the Http2StructureDecoder instance with random values.
static void Randomize(Http2StructureDecoder* p, Http2Random* rng);
diff --git a/quiche/http2/hpack/decoder/hpack_string_collector.h b/quiche/http2/hpack/decoder/hpack_string_collector.h
index 270c8a5..8134b81 100644
--- a/quiche/http2/hpack/decoder/hpack_string_collector.h
+++ b/quiche/http2/hpack/decoder/hpack_string_collector.h
@@ -14,6 +14,7 @@
#include "absl/strings/string_view.h"
#include "quiche/http2/hpack/decoder/hpack_string_decoder_listener.h"
+#include "quiche/common/platform/api/quiche_export.h"
#include "quiche/common/platform/api/quiche_test.h"
namespace http2 {
@@ -21,7 +22,8 @@
// Records the callbacks associated with a decoding a string; must
// call Clear() between decoding successive strings.
-struct HpackStringCollector : public HpackStringDecoderListener {
+struct QUICHE_NO_EXPORT HpackStringCollector
+ : public HpackStringDecoderListener {
enum CollectorState {
kGenesis,
kStarted,
@@ -55,7 +57,8 @@
bool operator!=(const HpackStringCollector& a, const HpackStringCollector& b);
-std::ostream& operator<<(std::ostream& out, const HpackStringCollector& v);
+QUICHE_NO_EXPORT std::ostream& operator<<(std::ostream& out,
+ const HpackStringCollector& v);
} // namespace test
} // namespace http2
diff --git a/quiche/http2/hpack/huffman/huffman_spec_tables.h b/quiche/http2/hpack/huffman/huffman_spec_tables.h
index d1b144b..1c1b500 100644
--- a/quiche/http2/hpack/huffman/huffman_spec_tables.h
+++ b/quiche/http2/hpack/huffman/huffman_spec_tables.h
@@ -9,9 +9,11 @@
#include <cstdint>
+#include "quiche/common/platform/api/quiche_export.h"
+
namespace http2 {
-struct HuffmanSpecTables {
+struct QUICHE_EXPORT_PRIVATE HuffmanSpecTables {
// Number of bits in the encoding of each symbol (byte).
static const uint8_t kCodeLengths[257];
diff --git a/quiche/http2/test_tools/frame_parts_collector.h b/quiche/http2/test_tools/frame_parts_collector.h
index 28ee06b..ccb6142 100644
--- a/quiche/http2/test_tools/frame_parts_collector.h
+++ b/quiche/http2/test_tools/frame_parts_collector.h
@@ -17,11 +17,13 @@
#include "quiche/http2/decoder/http2_frame_decoder_listener_test_util.h"
#include "quiche/http2/http2_structures.h"
#include "quiche/http2/test_tools/frame_parts.h"
+#include "quiche/common/platform/api/quiche_export.h"
namespace http2 {
namespace test {
-class FramePartsCollector : public FailingHttp2FrameDecoderListener {
+class QUICHE_NO_EXPORT FramePartsCollector
+ : public FailingHttp2FrameDecoderListener {
public:
FramePartsCollector();
~FramePartsCollector() override;
diff --git a/quiche/http2/test_tools/http2_random.h b/quiche/http2/test_tools/http2_random.h
index 4fe2a51..7682c7f 100644
--- a/quiche/http2/test_tools/http2_random.h
+++ b/quiche/http2/test_tools/http2_random.h
@@ -12,6 +12,7 @@
#include <string>
#include "absl/strings/string_view.h"
+#include "quiche/common/platform/api/quiche_export.h"
namespace http2 {
namespace test {
@@ -19,7 +20,7 @@
// The random number generator used for unit tests. Since the algorithm is
// deterministic and fixed, this can be used to reproduce flakes in the unit
// tests caused by specific random values.
-class Http2Random {
+class QUICHE_EXPORT_PRIVATE Http2Random {
public:
Http2Random();
diff --git a/quiche/http2/tools/http2_frame_builder.h b/quiche/http2/tools/http2_frame_builder.h
index e0682dc..d0ec441 100644
--- a/quiche/http2/tools/http2_frame_builder.h
+++ b/quiche/http2/tools/http2_frame_builder.h
@@ -21,11 +21,12 @@
#include "absl/strings/string_view.h"
#include "quiche/http2/http2_constants.h"
#include "quiche/http2/http2_structures.h"
+#include "quiche/common/platform/api/quiche_export.h"
namespace http2 {
namespace test {
-class Http2FrameBuilder {
+class QUICHE_NO_EXPORT Http2FrameBuilder {
public:
Http2FrameBuilder(Http2FrameType type, uint8_t flags, uint32_t stream_id);
explicit Http2FrameBuilder(const Http2FrameHeader& v);
diff --git a/quiche/spdy/core/hpack/hpack_constants.h b/quiche/spdy/core/hpack/hpack_constants.h
index 6c91a47..ca57ea0 100644
--- a/quiche/spdy/core/hpack/hpack_constants.h
+++ b/quiche/spdy/core/hpack/hpack_constants.h
@@ -19,13 +19,13 @@
// An HpackPrefix signifies |bits| stored in the top |bit_size| bits
// of an octet.
-struct HpackPrefix {
+struct QUICHE_EXPORT_PRIVATE HpackPrefix {
uint8_t bits;
size_t bit_size;
};
// Represents a symbol and its Huffman code (stored in most-significant bits).
-struct HpackHuffmanSymbol {
+struct QUICHE_EXPORT_PRIVATE HpackHuffmanSymbol {
uint32_t code;
uint8_t length;
uint16_t id;
@@ -33,7 +33,7 @@
// An entry in the static table. Must be a POD in order to avoid static
// initializers, i.e. no user-defined constructors or destructors.
-struct HpackStaticEntry {
+struct QUICHE_EXPORT_PRIVATE HpackStaticEntry {
const char* const name;
const size_t name_len;
const char* const value;
diff --git a/quiche/spdy/core/http2_header_block_hpack_listener.h b/quiche/spdy/core/http2_header_block_hpack_listener.h
index 795543a..0c21632 100644
--- a/quiche/spdy/core/http2_header_block_hpack_listener.h
+++ b/quiche/spdy/core/http2_header_block_hpack_listener.h
@@ -3,6 +3,7 @@
#include "absl/strings/string_view.h"
#include "quiche/http2/hpack/decoder/hpack_decoder_listener.h"
+#include "quiche/common/platform/api/quiche_export.h"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/spdy/core/spdy_header_block.h"
@@ -10,7 +11,8 @@
// This class simply gathers the key-value pairs emitted by an HpackDecoder in
// a SpdyHeaderBlock.
-class Http2HeaderBlockHpackListener : public http2::HpackDecoderListener {
+class QUICHE_EXPORT_PRIVATE Http2HeaderBlockHpackListener
+ : public http2::HpackDecoderListener {
public:
Http2HeaderBlockHpackListener() {}
diff --git a/quiche/spdy/core/metadata_extension.h b/quiche/spdy/core/metadata_extension.h
index a27ad16..4eaf95c 100644
--- a/quiche/spdy/core/metadata_extension.h
+++ b/quiche/spdy/core/metadata_extension.h
@@ -6,6 +6,7 @@
#include <vector>
#include "absl/container/flat_hash_map.h"
+#include "quiche/common/platform/api/quiche_export.h"
#include "quiche/spdy/core/http2_frame_decoder_adapter.h"
#include "quiche/spdy/core/spdy_header_block.h"
#include "quiche/spdy/core/spdy_protocol.h"
@@ -19,7 +20,8 @@
// a setting with a setting ID of kMetadataExtensionId and a value of 1.
//
// Metadata is represented as a HPACK header block with literal encoding.
-class MetadataVisitor : public spdy::ExtensionVisitorInterface {
+class QUICHE_EXPORT_PRIVATE MetadataVisitor
+ : public spdy::ExtensionVisitorInterface {
public:
using MetadataPayload = spdy::SpdyHeaderBlock;
@@ -89,11 +91,11 @@
};
// A class that serializes metadata blocks as sequences of frames.
-class MetadataSerializer {
+class QUICHE_EXPORT_PRIVATE MetadataSerializer {
public:
using MetadataPayload = spdy::SpdyHeaderBlock;
- class FrameSequence {
+ class QUICHE_EXPORT_PRIVATE FrameSequence {
public:
virtual ~FrameSequence() {}
diff --git a/quiche/spdy/core/spdy_simple_arena.h b/quiche/spdy/core/spdy_simple_arena.h
index 99a6f74..a423a79 100644
--- a/quiche/spdy/core/spdy_simple_arena.h
+++ b/quiche/spdy/core/spdy_simple_arena.h
@@ -16,7 +16,7 @@
// Not thread-safe.
class QUICHE_EXPORT_PRIVATE SpdySimpleArena {
public:
- class Status {
+ class QUICHE_EXPORT_PRIVATE Status {
private:
friend class SpdySimpleArena;
size_t bytes_allocated_;
@@ -52,7 +52,7 @@
Status status() const { return status_; }
private:
- struct Block {
+ struct QUICHE_EXPORT_PRIVATE Block {
std::unique_ptr<char[]> data;
size_t size = 0;
size_t used = 0;
diff --git a/quiche/spdy/core/zero_copy_output_buffer.h b/quiche/spdy/core/zero_copy_output_buffer.h
index 3f35bab..2536979 100644
--- a/quiche/spdy/core/zero_copy_output_buffer.h
+++ b/quiche/spdy/core/zero_copy_output_buffer.h
@@ -7,9 +7,11 @@
#include <cstdint>
+#include "quiche/common/platform/api/quiche_export.h"
+
namespace spdy {
-class ZeroCopyOutputBuffer {
+class QUICHE_EXPORT_PRIVATE ZeroCopyOutputBuffer {
public:
virtual ~ZeroCopyOutputBuffer() {}