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

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: Rebase only 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
« no previous file with comments | « net/spdy/spdy_frame_builder_test.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer.h
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index 8714e373c1b552edba33c5c5b38114eea0b4733d..3cca386e3f4a18e66c4f75cbaeb054114205a9b1 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
« no previous file with comments | « net/spdy/spdy_frame_builder_test.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698