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

Unified Diff: net/spdy/spdy_frame_builder.h

Issue 2794063002: Add a SpdyFramer extension API implementation. (Closed)
Patch Set: Add BeginNewExtensionFrame. 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 | « no previous file | net/spdy/spdy_frame_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_frame_builder.h
diff --git a/net/spdy/spdy_frame_builder.h b/net/spdy/spdy_frame_builder.h
index 2715452d90b702b9c371fb32f5f2027562bca9de..721934fcbed4ae91afd66838326f43c2218773f4 100644
--- a/net/spdy/spdy_frame_builder.h
+++ b/net/spdy/spdy_frame_builder.h
@@ -54,14 +54,22 @@ class NET_EXPORT_PRIVATE SpdyFrameBuilder {
uint8_t flags,
SpdyStreamId stream_id);
- // Populates this frame with a HTTP2 frame prefix with length information.
- // The given type must be a control frame type.
Bence 2017/04/05 13:43:09 This is incorrect: "control frame" means defined f
+ // Populates this frame with a HTTP2 frame prefix with type and length
+ // information. |type| must be a defined type.
bool BeginNewFrame(const SpdyFramer& framer,
SpdyFrameType type,
uint8_t flags,
SpdyStreamId stream_id,
size_t length);
+ // Populates this frame with a HTTP2 frame prefix with type and length
+ // information. |raw_frame_type| must not be a defined frame type.
+ bool BeginNewExtensionFrame(const SpdyFramer& framer,
+ uint8_t raw_frame_type,
+ uint8_t flags,
+ SpdyStreamId stream_id,
+ size_t length);
+
// Takes the buffer from the SpdyFrameBuilder.
SpdySerializedFrame take() {
SPDY_BUG_IF(output_ != nullptr) << "ZeroCopyOutputBuffer is used to build "
@@ -115,6 +123,14 @@ class NET_EXPORT_PRIVATE SpdyFrameBuilder {
FRIEND_TEST_ALL_PREFIXES(SpdyFrameBuilderTest, GetWritableOutput);
FRIEND_TEST_ALL_PREFIXES(SpdyFrameBuilderTest, GetWritableOutputNegative);
+ // Populates this frame with a HTTP2 frame prefix with type and length
+ // information.
+ bool BeginNewFrameInternal(const SpdyFramer& framer,
+ uint8_t raw_frame_type,
+ uint8_t flags,
+ SpdyStreamId stream_id,
+ size_t length);
+
// Returns a writeable buffer of given size in bytes, to be appended to the
// currently written frame. Does bounds checking on length but does not
// increment the underlying iterator. To do so, consumers should subsequently
« no previous file with comments | « no previous file | net/spdy/spdy_frame_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698