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

Unified Diff: net/spdy/spdy_framer.cc

Issue 12259003: Clean up the last remaining bits of SpdySynReplyControlFrame. (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_protocol.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer.cc
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index 3e3d32bae1898e5f7c9d775ce35ab5bdf70c8287..5b4c11f628991160a799754a2bca7ef27285b825 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -1020,8 +1020,10 @@ size_t SpdyFramer::ProcessControlFrameHeaderBlock(const char* data,
stream_id = reinterpret_cast<const SpdySynStreamControlFrame*>(
&control_frame)->stream_id();
} else if (control_frame.type() == SYN_REPLY) {
- stream_id = reinterpret_cast<const SpdySynReplyControlFrame*>(
- &control_frame)->stream_id();
+ SpdyFrameReader reader(current_frame_buffer_.get(), current_frame_len_);
+ reader.Seek(SpdyFrame::kHeaderSize); // Seek past frame header.
+ bool read_successful = reader.ReadUInt31(&stream_id);
+ DCHECK(read_successful);
} else if (control_frame.type() == HEADERS) {
stream_id = reinterpret_cast<const SpdyHeadersControlFrame*>(
&control_frame)->stream_id();
@@ -1808,12 +1810,10 @@ bool SpdyFramer::GetFrameBoundaries(const SpdyFrame& frame,
}
break;
case SYN_REPLY:
- {
- *header_length = GetSynReplyMinimumSize();
- *payload_length = frame.length() -
- (*header_length - GetControlFrameMinimumSize());
- *payload = frame.data() + *header_length;
- }
+ *header_length = GetSynReplyMinimumSize();
+ *payload_length = frame.length() -
+ (*header_length - GetControlFrameMinimumSize());
+ *payload = frame.data() + *header_length;
break;
case HEADERS:
{
« no previous file with comments | « no previous file | net/spdy/spdy_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698