| Index: net/spdy/spdy_protocol.h
|
| diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h
|
| index fd1351a487e48b3f8eb7f774689881325c7434a5..e871d2c24c8d1a47f20162864ff94be5267212a8 100644
|
| --- a/net/spdy/spdy_protocol.h
|
| +++ b/net/spdy/spdy_protocol.h
|
| @@ -384,6 +384,28 @@ typedef std::map<std::string, std::string> SpdyNameValueBlock;
|
|
|
| typedef uint64 SpdyPingId;
|
|
|
| +// TODO(hkhalil): Add direct testing for this? It won't increase coverage any,
|
| +// but is good to do anyway.
|
| +class SpdyConstants {
|
| + public:
|
| + // Returns true if a given on-the-wire enumeration of a frame type is valid
|
| + // for a given protocol version, false otherwise.
|
| + static bool IsValidFrameType(SpdyMajorVersion version, int frame_type_field);
|
| +
|
| + // Parses a frame type from an on-the-wire enumeration of a given protocol
|
| + // version.
|
| + // Behavior is undefined for invalid frame type fields; consumers should first
|
| + // use IsValidFrameType() to verify validity of frame type fields.
|
| + static SpdyFrameType ParseFrameType(SpdyMajorVersion version,
|
| + int frame_type_field);
|
| +
|
| + // Serializes a given frame type to the on-the-wire enumeration value for the
|
| + // given protocol version.
|
| + // Returns -1 on failure (I.E. Invalid frame type for the given version).
|
| + static int SerializeFrameType(SpdyMajorVersion version,
|
| + SpdyFrameType frame_type);
|
| +};
|
| +
|
| class SpdyFrame;
|
| typedef SpdyFrame SpdySerializedFrame;
|
|
|
|
|