summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session.cc
diff options
context:
space:
mode:
authormbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 05:23:06 +0000
committermbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 05:23:06 +0000
commit6cd3bd20cd448bc1bca33748395bf4381dfb7fc6 (patch)
tree1f51c74ac1b2f56e29110ff6bf683fbfeb6d5441 /net/spdy/spdy_session.cc
parent23114b4023e75494403e7c991e5707590a77ee7f (diff)
downloadchromium_src-6cd3bd20cd448bc1bca33748395bf4381dfb7fc6.zip
chromium_src-6cd3bd20cd448bc1bca33748395bf4381dfb7fc6.tar.gz
chromium_src-6cd3bd20cd448bc1bca33748395bf4381dfb7fc6.tar.bz2
Add logging to the spdy session pool.
BUG=none TEST=none Review URL: http://codereview.chromium.org/3280003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session.cc')
-rw-r--r--net/spdy/spdy_session.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 50a0a21..7402e5d 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -74,6 +74,21 @@ void AdjustSocketBufferSizes(ClientSocket* socket) {
socket->SetSendBufferSize(kSocketBufferSize);
}
+class NetLogSpdySessionParameter : public NetLog::EventParameters {
+ public:
+ explicit NetLogSpdySessionParameter(const HostPortProxyPair& host_pair)
+ : host_pair_(host_pair) {}
+ virtual Value* ToValue() const {
+ DictionaryValue* dict = new DictionaryValue();
+ dict->Set("host", new StringValue(host_pair_.first.ToString()));
+ dict->Set("proxy", new StringValue(host_pair_.second.ToPacString()));
+ return dict;
+ }
+ private:
+ const HostPortProxyPair host_pair_;
+ DISALLOW_COPY_AND_ASSIGN(NetLogSpdySessionParameter);
+};
+
class NetLogSpdySynParameter : public NetLog::EventParameters {
public:
NetLogSpdySynParameter(const linked_ptr<spdy::SpdyHeaderBlock>& headers,
@@ -176,8 +191,7 @@ SpdySession::SpdySession(const HostPortProxyPair& host_port_proxy_pair,
net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_SPDY_SESSION)) {
net_log_.BeginEvent(
NetLog::TYPE_SPDY_SESSION,
- new NetLogStringParameter("host_port",
- host_port_proxy_pair_.first.ToString()));
+ new NetLogSpdySessionParameter(host_port_proxy_pair_));
// TODO(mbelshe): consider randomization of the stream_hi_water_mark.