Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: net/socket/client_socket_handle.cc

Issue 2363003: Rework the logging for sockets/connectjobs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/client_socket_handle.h ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_handle.cc
===================================================================
--- net/socket/client_socket_handle.cc (revision 48758)
+++ net/socket/client_socket_handle.cc (working copy)
@@ -33,6 +33,7 @@
if (socket_.get()) {
// Because of http://crbug.com/37810 we may not have a pool, but have
// just a raw socket.
+ socket_->NetLog().EndEvent(NetLog::TYPE_SOCKET_IN_USE, NULL);
if (pool_)
// If we've still got a socket, release it back to the ClientSocketPool so
// it can be deleted or reused.
@@ -92,6 +93,15 @@
NOTREACHED();
break;
}
+
+ // Broadcast that the socket has been acquired.
+ // TODO(eroman): This logging is not complete, in particular set_socket() and
+ // release() socket. It ends up working though, since those methods are being
+ // used to layer sockets (and the destination sources are the same).
+ DCHECK(socket_.get());
+ socket_->NetLog().BeginEvent(
+ NetLog::TYPE_SOCKET_IN_USE,
+ new NetLogSourceParameter("source_dependency", requesting_source_));
}
} // namespace net
« no previous file with comments | « net/socket/client_socket_handle.h ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698