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

Unified Diff: net/spdy/spdy_framer.h

Issue 12224137: Centralize logic for calculating (minimum) size of SPDY frames, by type, in SpdyFramer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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_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 436ee6c04e3176173357273d0552140d054b62a9..e7cd38e8434370963178192b955afebb4e4c6652 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -475,10 +475,6 @@ class NET_EXPORT_PRIVATE SpdyFramer {
// Returns true if a frame could be compressed.
bool IsCompressible(const SpdyFrame& frame) const;
- // Get the minimum size of the control frame for the given control frame
- // type. This is useful for validating frame blocks.
- static size_t GetMinimumControlFrameSize(int version, SpdyControlType type);
-
// Get the stream ID for the given control frame (SYN_STREAM, SYN_REPLY, and
// HEADERS). If the control frame is NULL or of another type, this
// function returns kInvalidStream.
@@ -495,6 +491,19 @@ class NET_EXPORT_PRIVATE SpdyFramer {
display_protocol_ = protocol;
}
+ // Returns the (minimum) size of control frames (sans variable-length
+ // portions).
+ size_t GetControlFrameMinimumSize() const;
+ size_t GetSynStreamMinimumSize() const;
+ size_t GetSynReplyMinimumSize() const;
+ size_t GetRstStreamSize() const;
+ size_t GetSettingsMinimumSize() const;
+ size_t GetPingSize() const;
+ size_t GetGoAwaySize() const;
+ size_t GetHeadersMinimumSize() const;
+ size_t GetWindowUpdateSize() const;
+ size_t GetCredentialMinimumSize() const;
+
// For debugging.
static const char* StateToString(int state);
static const char* ErrorCodeToString(int error_code);
« no previous file with comments | « no previous file | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698