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

Unified Diff: net/spdy/spdy_frame_reader.h

Issue 12256004: Remove SpdySynReplyControlFrame and SpdyGoAwayControlFrame. (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 | « net/spdy/buffered_spdy_framer_spdy3_unittest.cc ('k') | net/spdy/spdy_frame_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_frame_reader.h
diff --git a/net/spdy/spdy_frame_reader.h b/net/spdy/spdy_frame_reader.h
index 3d456b77f29ac807871cb4731e846fd7585c3f2e..3f184561a52190619818f02e61e801f44cc18a5b 100644
--- a/net/spdy/spdy_frame_reader.h
+++ b/net/spdy/spdy_frame_reader.h
@@ -33,6 +33,11 @@ class NET_EXPORT_PRIVATE SpdyFrameReader {
// Empty destructor.
~SpdyFrameReader() {}
+ // Reads an 8-bit unsigned integer into the given output parameter.
+ // Forwards the internal iterater on success.
+ // Returns true on success, false otherwise.
+ bool ReadUInt8(uint8* result);
+
// Reads a 16-bit unsigned integer into the given output parameter.
// Forwards the internal iterater on success.
// Returns true on success, false otherwise.
@@ -43,6 +48,13 @@ class NET_EXPORT_PRIVATE SpdyFrameReader {
// Returns true on success, false otherwise.
bool ReadUInt32(uint32* result);
+ // Reads a 31-bit unsigned integer into the given output parameter. This is
+ // equivelant to ReadUInt32() above except that the highest-order bit is
+ // discarded.
+ // Forwards the internal iterater (by 4B) on success.
+ // Returns true on success, false otherwise.
+ bool ReadUInt31(uint32* result);
+
// Reads a string prefixed with 16-bit length into the given output parameter.
//
// NOTE: Does not copy but rather references strings in the underlying buffer.
@@ -67,6 +79,12 @@ class NET_EXPORT_PRIVATE SpdyFrameReader {
// Returns true on success, false otherwise.
bool ReadBytes(void* result, size_t size);
+ // Seeks a given number of bytes into the buffer from the current offset.
+ // Equivelant to an empty read.
+ // Forwards the internal iterator.
+ // Returns true on success, false otherwise.
+ bool Seek(size_t size);
+
// Returns true if the entirety of the underlying buffer has been read via
// Read*() calls.
bool IsDoneReading() const;
« no previous file with comments | « net/spdy/buffered_spdy_framer_spdy3_unittest.cc ('k') | net/spdy/spdy_frame_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698