summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_framer.cc
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-15 04:03:40 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-15 04:03:40 +0000
commitf14a2ba847daeeb0bf71215ee6481865c409ddef (patch)
tree897ea8384ec8fc7b8e7957166876275e0556ee8e /net/spdy/spdy_framer.cc
parent7296f9f06b16ed1cf30db48cd74fa7a601942d06 (diff)
downloadchromium_src-f14a2ba847daeeb0bf71215ee6481865c409ddef.zip
chromium_src-f14a2ba847daeeb0bf71215ee6481865c409ddef.tar.gz
chromium_src-f14a2ba847daeeb0bf71215ee6481865c409ddef.tar.bz2
SPDY - pass stream_id instread contol frame to
OnControlFrameHeaderData. In OnControl method cache the control_frame which would be used in OnControlFrameHeaderData. TEST=network unit tests BUG=108609 R=willchan Review URL: http://codereview.chromium.org/9242034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122025 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_framer.cc')
-rw-r--r--net/spdy/spdy_framer.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index 71e79b4..f476c84 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -604,7 +604,8 @@ size_t SpdyFramer::ProcessControlFrameHeaderBlock(const char* data,
if (remaining_control_payload_ == 0 && processed_successfully) {
// The complete header block has been delivered. We send a zero-length
// OnControlFrameHeaderData() to indicate this.
- visitor_->OnControlFrameHeaderData(&control_frame, NULL, 0);
+ visitor_->OnControlFrameHeaderData(
+ GetControlFrameStreamId(&control_frame), NULL, 0);
// If this is a FIN, tell the caller.
if (control_frame.flags() & CONTROL_FLAG_FIN) {
@@ -1537,7 +1538,7 @@ bool SpdyFramer::IncrementallyDecompressControlFrameHeaderData(
size_t decompressed_len = arraysize(buffer) - decomp->avail_out;
if (decompressed_len > 0) {
processed_successfully = visitor_->OnControlFrameHeaderData(
- control_frame, buffer, decompressed_len);
+ stream_id, buffer, decompressed_len);
}
if (!processed_successfully) {
// Assume that the problem was the header block was too large for the
@@ -1556,7 +1557,7 @@ bool SpdyFramer::IncrementallyDeliverControlFrameHeaderData(
DCHECK_LT(0u, stream_id);
while (read_successfully && len > 0) {
size_t bytes_to_deliver = std::min(len, kHeaderDataChunkMaxSize);
- read_successfully = visitor_->OnControlFrameHeaderData(control_frame, data,
+ read_successfully = visitor_->OnControlFrameHeaderData(stream_id, data,
bytes_to_deliver);
data += bytes_to_deliver;
len -= bytes_to_deliver;