summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session_pool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/spdy/spdy_session_pool.cc')
-rw-r--r--net/spdy/spdy_session_pool.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index fe2a310..aa807af 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -41,9 +41,10 @@ scoped_refptr<SpdySession> SpdySessionPool::Get(
if (list->size() >= static_cast<unsigned int>(g_max_sessions_per_domain)) {
spdy_session = list->front();
list->pop_front();
- net_log.AddEvent(NetLog::TYPE_SPDY_SESSION_POOL_FOUND_EXISTING_SESSION,
- new NetLogSourceParameter("session",
- spdy_session->net_log().source()));
+ net_log.AddEvent(
+ NetLog::TYPE_SPDY_SESSION_POOL_FOUND_EXISTING_SESSION,
+ make_scoped_refptr(new NetLogSourceParameter(
+ "session", spdy_session->net_log().source())));
}
} else {
list = AddSessionList(host_port_proxy_pair);
@@ -53,9 +54,10 @@ scoped_refptr<SpdySession> SpdySessionPool::Get(
if (!spdy_session) {
spdy_session = new SpdySession(host_port_proxy_pair, this, spdy_settings,
net_log.net_log());
- net_log.AddEvent(NetLog::TYPE_SPDY_SESSION_POOL_CREATED_NEW_SESSION,
- new NetLogSourceParameter("session",
- spdy_session->net_log().source()));
+ net_log.AddEvent(
+ NetLog::TYPE_SPDY_SESSION_POOL_CREATED_NEW_SESSION,
+ make_scoped_refptr(new NetLogSourceParameter(
+ "session", spdy_session->net_log().source())));
}
DCHECK(spdy_session);
@@ -81,9 +83,10 @@ net::Error SpdySessionPool::GetSpdySessionFromSocket(
DCHECK(list->empty());
list->push_back(*spdy_session);
- net_log.AddEvent(NetLog::TYPE_SPDY_SESSION_POOL_IMPORTED_SESSION_FROM_SOCKET,
- new NetLogSourceParameter("session",
- (*spdy_session)->net_log().source()));
+ net_log.AddEvent(
+ NetLog::TYPE_SPDY_SESSION_POOL_IMPORTED_SESSION_FROM_SOCKET,
+ make_scoped_refptr(new NetLogSourceParameter(
+ "session", (*spdy_session)->net_log().source())));
// Now we can initialize the session with the SSL socket.
return (*spdy_session)->InitializeWithSocket(connection, is_secure,
@@ -103,9 +106,10 @@ void SpdySessionPool::Remove(const scoped_refptr<SpdySession>& session) {
if (!list)
return;
list->remove(session);
- session->net_log().AddEvent(NetLog::TYPE_SPDY_SESSION_POOL_REMOVE_SESSION,
- new NetLogSourceParameter("session",
- session->net_log().source()));
+ session->net_log().AddEvent(
+ NetLog::TYPE_SPDY_SESSION_POOL_REMOVE_SESSION,
+ make_scoped_refptr(new NetLogSourceParameter(
+ "session", session->net_log().source())));
if (list->empty())
RemoveSessionList(session->host_port_proxy_pair());
}