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

Unified Diff: net/spdy/spdy_framer.h

Issue 246013002: SPDY: Headers & Push-Promise now use Continuations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: net/spdy/spdy_framer.h
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index ad76603bd88baebc630d995c056c22fd95a108bf..b7de86b20f835af440157fc5917b16932c9276e7 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -487,6 +487,9 @@ class NET_EXPORT_PRIVATE SpdyFramer {
// Returns the maximum payload size of a DATA frame.
size_t GetDataFrameMaximumPayload() const;
+ // Returns the prefix length for the given frame type.
+ size_t GetPrefixLength(SpdyFrameType type) const;
+
// For debugging.
static const char* StateToString(int state);
static const char* ErrorCodeToString(int error_code);
@@ -511,6 +514,7 @@ class NET_EXPORT_PRIVATE SpdyFramer {
size_t len);
protected:
+ // TODO(jgraettinger): Switch to test peer pattern.
FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, BasicCompression);
FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, ControlFrameSizesAreValidated);
FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, HeaderCompression);
@@ -527,6 +531,10 @@ class NET_EXPORT_PRIVATE SpdyFramer {
ReadLargeSettingsFrameInSmallChunks);
FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, ControlFrameAtMaxSizeLimit);
FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, ControlFrameTooLarge);
+ FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest,
+ TooLargeHeadersFrameUsesContinuation);
+ FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest,
+ TooLargePushPromiseFrameUsesContinuation);
friend class net::HttpNetworkLayer; // This is temporary for the server.
friend class net::HttpNetworkTransactionTest;
friend class net::HttpProxyClientSocketPoolTest;
@@ -578,6 +586,13 @@ class NET_EXPORT_PRIVATE SpdyFramer {
z_stream* GetHeaderCompressor();
z_stream* GetHeaderDecompressor();
+ size_t GetNumberRequiredContinuationFrames(size_t size);
+
+ void WritePayloadWithContinuation(SpdyFrameBuilder* builder,
+ const std::string& hpack_encoding,
+ SpdyStreamId stream_id,
+ SpdyFrameType type);
+
private:
// Deliver the given control frame's uncompressed headers block to the
// visitor in chunks. Returns true if the visitor has accepted all of the

Powered by Google App Engine
This is Rietveld 408576698