summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_framer.cc
diff options
context:
space:
mode:
authoreustas@chromium.org <eustas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-10 17:02:14 +0000
committereustas@chromium.org <eustas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-10 17:02:14 +0000
commit6b5abc76efae5ce3124d3e81e49d605e2d2d3450 (patch)
treef51a9c63d54f97bdd8e381d9b318a9dcc1b733c8 /net/spdy/spdy_framer.cc
parentb46691fdedd6a70f19a237c89c5aec9fa4165a15 (diff)
downloadchromium_src-6b5abc76efae5ce3124d3e81e49d605e2d2d3450.zip
chromium_src-6b5abc76efae5ce3124d3e81e49d605e2d2d3450.tar.gz
chromium_src-6b5abc76efae5ce3124d3e81e49d605e2d2d3450.tar.bz2
SPDY Framer: Refactorings.
Pick up cl/48817545 Remove OnSynStreamCompressed from SpdyFramerVisitorInterface in favour of SpdyFramerDebugVisitorInterface. BUG=242152 Review URL: https://chromiumcodereview.appspot.com/16360010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_framer.cc')
-rw-r--r--net/spdy/spdy_framer.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index ed53b38..aeb42893 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -823,12 +823,6 @@ void SpdyFramer::ProcessControlFrameHeader(uint16 control_frame_type_field) {
remaining_control_header_ = frame_size_without_variable_data -
current_frame_buffer_length_;
- if (debug_visitor_) {
- debug_visitor_->OnReceiveCompressedFrame(current_frame_stream_id_,
- current_frame_type_,
- current_frame_length_);
- }
-
CHANGE_STATE(SPDY_CONTROL_FRAME_BEFORE_HEADER_BLOCK);
return;
}
@@ -1107,6 +1101,12 @@ size_t SpdyFramer::ProcessControlFrameBeforeHeaderBlock(const char* data,
}
DCHECK(reader.IsDoneReading());
+ if (debug_visitor_) {
+ debug_visitor_->OnReceiveCompressedFrame(
+ current_frame_stream_id_,
+ current_frame_type_,
+ current_frame_length_);
+ }
visitor_->OnSynStream(
current_frame_stream_id_,
associated_to_stream_id,
@@ -1131,6 +1131,12 @@ size_t SpdyFramer::ProcessControlFrameBeforeHeaderBlock(const char* data,
reader.Seek(2);
}
DCHECK(reader.IsDoneReading());
+ if (debug_visitor_) {
+ debug_visitor_->OnReceiveCompressedFrame(
+ current_frame_stream_id_,
+ current_frame_type_,
+ current_frame_length_);
+ }
if (current_frame_type_ == SYN_REPLY) {
visitor_->OnSynReply(
current_frame_stream_id_,
@@ -1583,9 +1589,6 @@ SpdySerializedFrame* SpdyFramer::SerializeSynStream(
DCHECK_EQ(GetSynStreamMinimumSize(), builder.length());
SerializeNameValueBlock(&builder, syn_stream);
- if (visitor_)
- visitor_->OnSynStreamCompressed(size, builder.length());
-
if (debug_visitor_) {
const size_t payload_len = GetSerializedLength(
protocol_version(), &(syn_stream.name_value_block()));