From a2006ecefa10d259d0a85ac4146b913eb0f9d02f Mon Sep 17 00:00:00 2001 From: "vandebo@chromium.org" Date: Fri, 23 Apr 2010 16:44:02 +0000 Subject: Add net log entries that summarize transmit and receive byte counts. Tx/Rx summaries are integrated into the net log at the last point that bytes were transmitted or received. Hopefully this will help resolve http://crbug.com/37729 by showing if we've received bytes over the network when we hit the "Waiting for cache" bug. This change also modernizes the use of NetLog: - ClientSocket now has a net_log() accessor - ClientSocket::Connect no longer takes a NetLog, instead the TCPClientSocket constructor takes one, others use their transport socket's NetLog - TCPClientSocket creates a new source id with source type SOCKET Also updates PassiveLogCollector infrastructure: - The LiveRequestsObserver lets a RequestTracker update a RequestInfo just before it is displayed. This allows ConnectJobs to be associated with URLRequests while connecting and then reassociated if they are late-bound to a different request. BUG=37729 TEST=tx/rx lines show up in chrome://net-internals/ Review URL: http://codereview.chromium.org/1696005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45449 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket/socks_client_socket_pool_unittest.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'net/socket/socks_client_socket_pool_unittest.cc') diff --git a/net/socket/socks_client_socket_pool_unittest.cc b/net/socket/socks_client_socket_pool_unittest.cc index 4291f3c..e2e30a3 100644 --- a/net/socket/socks_client_socket_pool_unittest.cc +++ b/net/socket/socks_client_socket_pool_unittest.cc @@ -37,8 +37,8 @@ class MockTCPClientSocketPool : public TCPClientSocketPool { ALLOW_THIS_IN_INITIALIZER_LIST( connect_callback_(this, &MockConnectJob::OnConnect)) {} - int Connect(const BoundNetLog& net_log) { - int rv = socket_->Connect(&connect_callback_, net_log); + int Connect() { + int rv = socket_->Connect(&connect_callback_); if (rv == OK) { user_callback_ = NULL; OnConnect(OK); @@ -103,10 +103,10 @@ class MockTCPClientSocketPool : public TCPClientSocketPool { CompletionCallback* callback, const BoundNetLog& net_log) { ClientSocket* socket = client_socket_factory_->CreateTCPClientSocket( - AddressList()); + AddressList(), net_log.net_log()); MockConnectJob* job = new MockConnectJob(socket, handle, callback); job_list_.push_back(job); - return job->Connect(net_log); + return job->Connect(); } virtual void CancelRequest(const std::string& group_name, -- cgit v1.1