diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-15 00:36:54 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-15 00:36:54 +0000 |
commit | 429e1ec2b634ce856c43f077ae6d18d537fc86f2 (patch) | |
tree | 42df518dba3797644bbbdf6ec5e05fbd85d7d9d4 /net/spdy | |
parent | a938b706f6a17ffe41143c0637f4e713467894d0 (diff) | |
download | chromium_src-429e1ec2b634ce856c43f077ae6d18d537fc86f2.zip chromium_src-429e1ec2b634ce856c43f077ae6d18d537fc86f2.tar.gz chromium_src-429e1ec2b634ce856c43f077ae6d18d537fc86f2.tar.bz2 |
SPDY: Add push streams to the NetLog.
For streams that already have delegates, they have their own NetLogs so use those.
For streams that don't have delegates, just write out to the session's NetLog.
TODO(willchan): Use a different event type once the SpdySession NetLog tracker is landed.
Review URL: http://codereview.chromium.org/2101003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r-- | net/spdy/spdy_session.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index 4208d06..55c0b65 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -1012,10 +1012,27 @@ void SpdySession::OnSyn(const spdy::SpdySynStreamControlFrame& frame, CHECK(stream->pushed()); CHECK_EQ(0u, stream->stream_id()); stream->set_stream_id(stream_id); + const BoundNetLog& log = stream->net_log(); + if (log.HasListener()) { + log.AddEvent( + NetLog::TYPE_SPDY_STREAM_PUSHED_SYN_STREAM, + new NetLogSpdySynParameter( + headers, static_cast<spdy::SpdyControlFlags>(frame.flags()), + stream_id)); + } } else { - // TODO(willchan): can we figure out how to use a NetLog here? stream = new SpdyStream(this, stream_id, true); + // TODO(willchan): Rename this event to SPDY_SESSION_PUSHED_SYN_STREAM once + // my other CL gets finished. + if (net_log_.HasListener()) { + net_log_.AddEvent( + NetLog::TYPE_SPDY_STREAM_PUSHED_SYN_STREAM, + new NetLogSpdySynParameter( + headers, static_cast<spdy::SpdyControlFlags>(frame.flags()), + stream_id)); + } + // A new HttpResponseInfo object needs to be generated so the call to // OnResponseReceived below has something to fill in. // When a SpdyNetworkTransaction is created for this resource, the |