Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: net/spdy/core/spdy_protocol.h

Issue 2839373002: Implement SPDY_EXPORT and SPDY_EXPORT_PRIVATE macros. (Closed)
Patch Set: Rebase: manually resolve trivial merge conflicts. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/core/spdy_prefixed_buffer_reader.h ('k') | net/spdy/core/write_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/core/spdy_protocol.h
diff --git a/net/spdy/core/spdy_protocol.h b/net/spdy/core/spdy_protocol.h
index 4e08f99dc66de57719e44112e71bb928c4d861d9..9c3458a25fa856cd78af846bc7802361171c594d 100644
--- a/net/spdy/core/spdy_protocol.h
+++ b/net/spdy/core/spdy_protocol.h
@@ -23,11 +23,11 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/sys_byteorder.h"
-#include "net/base/net_export.h"
#include "net/spdy/core/spdy_alt_svc_wire_format.h"
#include "net/spdy/core/spdy_bitmasks.h"
#include "net/spdy/core/spdy_bug_tracker.h"
#include "net/spdy/core/spdy_header_block.h"
+#include "net/spdy/platform/api/spdy_export.h"
#include "net/spdy/platform/api/spdy_ptr_util.h"
#include "net/spdy/platform/api/spdy_string.h"
#include "net/spdy/platform/api/spdy_string_piece.h"
@@ -67,7 +67,7 @@ const int32_t kPaddingSizePerFrame = 256;
// defined as a string literal with a null terminator, the actual connection
// preface is only the first |kHttp2ConnectionHeaderPrefixSize| bytes, which
// excludes the null terminator.
-NET_EXPORT_PRIVATE extern const char* const kHttp2ConnectionHeaderPrefix;
+SPDY_EXPORT_PRIVATE extern const char* const kHttp2ConnectionHeaderPrefix;
const int kHttp2ConnectionHeaderPrefixSize = 24;
// Wire values for HTTP2 frame types.
@@ -150,13 +150,13 @@ enum SpdySettingsIds : uint16_t {
// This explicit operator is needed, otherwise compiler finds
// overloaded operator to be ambiguous.
-NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
- SpdySettingsIds id);
+SPDY_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
+ SpdySettingsIds id);
// This operator is needed, because SpdyFrameType is an enum class,
// therefore implicit conversion to underlying integer type is not allowed.
-NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
- SpdyFrameType frame_type);
+SPDY_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
+ SpdyFrameType frame_type);
using SettingsMap = std::map<SpdySettingsIds, uint32_t>;
@@ -189,7 +189,7 @@ const SpdyPriority kV3HighestPriority = 0;
const SpdyPriority kV3LowestPriority = 7;
// Returns SPDY 3.x priority value clamped to the valid range of [0, 7].
-NET_EXPORT_PRIVATE SpdyPriority ClampSpdy3Priority(SpdyPriority priority);
+SPDY_EXPORT_PRIVATE SpdyPriority ClampSpdy3Priority(SpdyPriority priority);
// HTTP/2 stream weights are integers in range [1, 256], as specified in RFC
// 7540 section 5.3.2. Default stream weight is defined in section 5.3.5.
@@ -198,19 +198,19 @@ const int kHttp2MaxStreamWeight = 256;
const int kHttp2DefaultStreamWeight = 16;
// Returns HTTP/2 weight clamped to the valid range of [1, 256].
-NET_EXPORT_PRIVATE int ClampHttp2Weight(int weight);
+SPDY_EXPORT_PRIVATE int ClampHttp2Weight(int weight);
// Maps SPDY 3.x priority value in range [0, 7] to HTTP/2 weight value in range
// [1, 256], where priority 0 (i.e. highest precedence) corresponds to maximum
// weight 256 and priority 7 (lowest precedence) corresponds to minimum weight
// 1.
-NET_EXPORT_PRIVATE int Spdy3PriorityToHttp2Weight(SpdyPriority priority);
+SPDY_EXPORT_PRIVATE int Spdy3PriorityToHttp2Weight(SpdyPriority priority);
// Maps HTTP/2 weight value in range [1, 256] to SPDY 3.x priority value in
// range [0, 7], where minimum weight 1 corresponds to priority 7 (lowest
// precedence) and maximum weight 256 corresponds to priority 0 (highest
// precedence).
-NET_EXPORT_PRIVATE SpdyPriority Http2WeightToSpdy3Priority(int weight);
+SPDY_EXPORT_PRIVATE SpdyPriority Http2WeightToSpdy3Priority(int weight);
// Reserved ID for root stream of HTTP/2 stream dependency tree, as specified
// in RFC 7540 section 5.3.1.
@@ -220,20 +220,20 @@ typedef uint64_t SpdyPingId;
// Returns true if a given on-the-wire enumeration of a frame type is defined
// in a standardized HTTP/2 specification, false otherwise.
-NET_EXPORT_PRIVATE bool IsDefinedFrameType(uint8_t frame_type_field);
+SPDY_EXPORT_PRIVATE bool IsDefinedFrameType(uint8_t frame_type_field);
// Parses a frame type from an on-the-wire enumeration.
// Behavior is undefined for invalid frame type fields; consumers should first
// use IsValidFrameType() to verify validity of frame type fields.
-NET_EXPORT_PRIVATE SpdyFrameType ParseFrameType(uint8_t frame_type_field);
+SPDY_EXPORT_PRIVATE SpdyFrameType ParseFrameType(uint8_t frame_type_field);
// Serializes a frame type to the on-the-wire value.
-NET_EXPORT_PRIVATE uint8_t SerializeFrameType(SpdyFrameType frame_type);
+SPDY_EXPORT_PRIVATE uint8_t SerializeFrameType(SpdyFrameType frame_type);
// (HTTP/2) All standard frame types except WINDOW_UPDATE are
// (stream-specific xor connection-level). Returns false iff we know
// the given frame type does not align with the given streamID.
-NET_EXPORT_PRIVATE bool IsValidHTTP2FrameStreamId(
+SPDY_EXPORT_PRIVATE bool IsValidHTTP2FrameStreamId(
SpdyStreamId current_frame_stream_id,
SpdyFrameType frame_type_field);
@@ -242,18 +242,18 @@ const char* FrameTypeToString(SpdyFrameType frame_type);
// If |wire_setting_id| is the on-the-wire representation of a defined SETTINGS
// parameter, parse it to |*setting_id| and return true.
-NET_EXPORT_PRIVATE bool ParseSettingsId(uint16_t wire_setting_id,
- SpdySettingsIds* setting_id);
+SPDY_EXPORT_PRIVATE bool ParseSettingsId(uint16_t wire_setting_id,
+ SpdySettingsIds* setting_id);
// Return if |id| corresponds to a defined setting;
// stringify |id| to |*settings_id_string| regardless.
-NET_EXPORT_PRIVATE bool SettingsIdToString(SpdySettingsIds id,
- const char** settings_id_string);
+SPDY_EXPORT_PRIVATE bool SettingsIdToString(SpdySettingsIds id,
+ const char** settings_id_string);
// Parse |wire_error_code| to a SpdyErrorCode.
// Treat unrecognized error codes as INTERNAL_ERROR
// as recommended by the HTTP/2 specification.
-NET_EXPORT_PRIVATE SpdyErrorCode ParseErrorCode(uint32_t wire_error_code);
+SPDY_EXPORT_PRIVATE SpdyErrorCode ParseErrorCode(uint32_t wire_error_code);
// Serialize RST_STREAM or GOAWAY frame error code to string
// for logging/debugging.
@@ -375,7 +375,7 @@ typedef StreamPrecedence<SpdyStreamId> SpdyStreamPrecedence;
class SpdyFrameVisitor;
// Intermediate representation for HTTP2 frames.
-class NET_EXPORT_PRIVATE SpdyFrameIR {
+class SPDY_EXPORT_PRIVATE SpdyFrameIR {
public:
virtual ~SpdyFrameIR() {}
@@ -391,7 +391,7 @@ class NET_EXPORT_PRIVATE SpdyFrameIR {
// Abstract class intended to be inherited by IRs that have a stream associated
// to them.
-class NET_EXPORT_PRIVATE SpdyFrameWithStreamIdIR : public SpdyFrameIR {
+class SPDY_EXPORT_PRIVATE SpdyFrameWithStreamIdIR : public SpdyFrameIR {
public:
~SpdyFrameWithStreamIdIR() override {}
SpdyStreamId stream_id() const { return stream_id_; }
@@ -413,7 +413,7 @@ class NET_EXPORT_PRIVATE SpdyFrameWithStreamIdIR : public SpdyFrameIR {
// Abstract class intended to be inherited by IRs that have the option of a FIN
// flag. Implies SpdyFrameWithStreamIdIR.
-class NET_EXPORT_PRIVATE SpdyFrameWithFinIR : public SpdyFrameWithStreamIdIR {
+class SPDY_EXPORT_PRIVATE SpdyFrameWithFinIR : public SpdyFrameWithStreamIdIR {
public:
~SpdyFrameWithFinIR() override {}
bool fin() const { return fin_; }
@@ -432,7 +432,7 @@ class NET_EXPORT_PRIVATE SpdyFrameWithFinIR : public SpdyFrameWithStreamIdIR {
// Abstract class intended to be inherited by IRs that contain a header
// block. Implies SpdyFrameWithFinIR.
-class NET_EXPORT_PRIVATE SpdyFrameWithHeaderBlockIR
+class SPDY_EXPORT_PRIVATE SpdyFrameWithHeaderBlockIR
: public NON_EXPORTED_BASE(SpdyFrameWithFinIR) {
public:
~SpdyFrameWithHeaderBlockIR() override;
@@ -459,7 +459,7 @@ class NET_EXPORT_PRIVATE SpdyFrameWithHeaderBlockIR
DISALLOW_COPY_AND_ASSIGN(SpdyFrameWithHeaderBlockIR);
};
-class NET_EXPORT_PRIVATE SpdyDataIR
+class SPDY_EXPORT_PRIVATE SpdyDataIR
: public NON_EXPORTED_BASE(SpdyFrameWithFinIR) {
public:
// Performs a deep copy on data.
@@ -530,7 +530,7 @@ class NET_EXPORT_PRIVATE SpdyDataIR
DISALLOW_COPY_AND_ASSIGN(SpdyDataIR);
};
-class NET_EXPORT_PRIVATE SpdyRstStreamIR : public SpdyFrameWithStreamIdIR {
+class SPDY_EXPORT_PRIVATE SpdyRstStreamIR : public SpdyFrameWithStreamIdIR {
public:
SpdyRstStreamIR(SpdyStreamId stream_id, SpdyErrorCode error_code);
@@ -549,7 +549,7 @@ class NET_EXPORT_PRIVATE SpdyRstStreamIR : public SpdyFrameWithStreamIdIR {
DISALLOW_COPY_AND_ASSIGN(SpdyRstStreamIR);
};
-class NET_EXPORT_PRIVATE SpdySettingsIR : public SpdyFrameIR {
+class SPDY_EXPORT_PRIVATE SpdySettingsIR : public SpdyFrameIR {
public:
SpdySettingsIR();
~SpdySettingsIR() override;
@@ -574,7 +574,7 @@ class NET_EXPORT_PRIVATE SpdySettingsIR : public SpdyFrameIR {
DISALLOW_COPY_AND_ASSIGN(SpdySettingsIR);
};
-class NET_EXPORT_PRIVATE SpdyPingIR : public SpdyFrameIR {
+class SPDY_EXPORT_PRIVATE SpdyPingIR : public SpdyFrameIR {
public:
explicit SpdyPingIR(SpdyPingId id) : id_(id), is_ack_(false) {}
SpdyPingId id() const { return id_; }
@@ -593,7 +593,7 @@ class NET_EXPORT_PRIVATE SpdyPingIR : public SpdyFrameIR {
DISALLOW_COPY_AND_ASSIGN(SpdyPingIR);
};
-class NET_EXPORT_PRIVATE SpdyGoAwayIR : public SpdyFrameIR {
+class SPDY_EXPORT_PRIVATE SpdyGoAwayIR : public SpdyFrameIR {
public:
// References description, doesn't copy it, so description must outlast
// this SpdyGoAwayIR.
@@ -640,7 +640,7 @@ class NET_EXPORT_PRIVATE SpdyGoAwayIR : public SpdyFrameIR {
DISALLOW_COPY_AND_ASSIGN(SpdyGoAwayIR);
};
-class NET_EXPORT_PRIVATE SpdyHeadersIR : public SpdyFrameWithHeaderBlockIR {
+class SPDY_EXPORT_PRIVATE SpdyHeadersIR : public SpdyFrameWithHeaderBlockIR {
public:
explicit SpdyHeadersIR(SpdyStreamId stream_id)
: SpdyHeadersIR(stream_id, SpdyHeaderBlock()) {}
@@ -680,7 +680,7 @@ class NET_EXPORT_PRIVATE SpdyHeadersIR : public SpdyFrameWithHeaderBlockIR {
DISALLOW_COPY_AND_ASSIGN(SpdyHeadersIR);
};
-class NET_EXPORT_PRIVATE SpdyWindowUpdateIR : public SpdyFrameWithStreamIdIR {
+class SPDY_EXPORT_PRIVATE SpdyWindowUpdateIR : public SpdyFrameWithStreamIdIR {
public:
SpdyWindowUpdateIR(SpdyStreamId stream_id, int32_t delta)
: SpdyFrameWithStreamIdIR(stream_id) {
@@ -703,7 +703,8 @@ class NET_EXPORT_PRIVATE SpdyWindowUpdateIR : public SpdyFrameWithStreamIdIR {
DISALLOW_COPY_AND_ASSIGN(SpdyWindowUpdateIR);
};
-class NET_EXPORT_PRIVATE SpdyPushPromiseIR : public SpdyFrameWithHeaderBlockIR {
+class SPDY_EXPORT_PRIVATE SpdyPushPromiseIR
+ : public SpdyFrameWithHeaderBlockIR {
public:
SpdyPushPromiseIR(SpdyStreamId stream_id, SpdyStreamId promised_stream_id)
: SpdyPushPromiseIR(stream_id, promised_stream_id, SpdyHeaderBlock()) {}
@@ -739,7 +740,7 @@ class NET_EXPORT_PRIVATE SpdyPushPromiseIR : public SpdyFrameWithHeaderBlockIR {
DISALLOW_COPY_AND_ASSIGN(SpdyPushPromiseIR);
};
-class NET_EXPORT_PRIVATE SpdyContinuationIR : public SpdyFrameWithStreamIdIR {
+class SPDY_EXPORT_PRIVATE SpdyContinuationIR : public SpdyFrameWithStreamIdIR {
public:
explicit SpdyContinuationIR(SpdyStreamId stream_id);
~SpdyContinuationIR() override;
@@ -761,7 +762,7 @@ class NET_EXPORT_PRIVATE SpdyContinuationIR : public SpdyFrameWithStreamIdIR {
DISALLOW_COPY_AND_ASSIGN(SpdyContinuationIR);
};
-class NET_EXPORT_PRIVATE SpdyAltSvcIR : public SpdyFrameWithStreamIdIR {
+class SPDY_EXPORT_PRIVATE SpdyAltSvcIR : public SpdyFrameWithStreamIdIR {
public:
explicit SpdyAltSvcIR(SpdyStreamId stream_id);
~SpdyAltSvcIR() override;
@@ -786,7 +787,7 @@ class NET_EXPORT_PRIVATE SpdyAltSvcIR : public SpdyFrameWithStreamIdIR {
DISALLOW_COPY_AND_ASSIGN(SpdyAltSvcIR);
};
-class NET_EXPORT_PRIVATE SpdyPriorityIR : public SpdyFrameWithStreamIdIR {
+class SPDY_EXPORT_PRIVATE SpdyPriorityIR : public SpdyFrameWithStreamIdIR {
public:
SpdyPriorityIR(SpdyStreamId stream_id,
SpdyStreamId parent_stream_id,
« no previous file with comments | « net/spdy/core/spdy_prefixed_buffer_reader.h ('k') | net/spdy/core/write_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698