diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-01 21:15:19 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-01 21:15:19 +0000 |
commit | 267a0d66d9ff4da5043c4c2a1bf0db55d2221d50 (patch) | |
tree | 842402558664153742c3bb22d8158a2b948238ae /net/socket/tcp_client_socket_libevent.cc | |
parent | dc8bb584a5fa7595378f963e98164fb9f4e2c421 (diff) | |
download | chromium_src-267a0d66d9ff4da5043c4c2a1bf0db55d2221d50.zip chromium_src-267a0d66d9ff4da5043c4c2a1bf0db55d2221d50.tar.gz chromium_src-267a0d66d9ff4da5043c4c2a1bf0db55d2221d50.tar.bz2 |
Adds URLRequestJob bytes read to NetLog.
Also no longer include raw bytes for 0-length transfers.
BUG=81003
TEST=none
Review URL: http://codereview.chromium.org/7084007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/tcp_client_socket_libevent.cc')
-rw-r--r-- | net/socket/tcp_client_socket_libevent.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc index 222ff94..2e4c97d 100644 --- a/net/socket/tcp_client_socket_libevent.cc +++ b/net/socket/tcp_client_socket_libevent.cc @@ -435,8 +435,8 @@ int TCPClientSocketLibevent::Read(IOBuffer* buf, read_bytes.Add(nread); if (nread > 0) use_history_.set_was_used_to_convey_data(); - LogByteTransfer( - net_log_, NetLog::TYPE_SOCKET_BYTES_RECEIVED, nread, buf->data()); + net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED, nread, + buf->data()); return nread; } if (errno != EAGAIN && errno != EWOULDBLOCK) { @@ -474,8 +474,8 @@ int TCPClientSocketLibevent::Write(IOBuffer* buf, write_bytes.Add(nwrite); if (nwrite > 0) use_history_.set_was_used_to_convey_data(); - LogByteTransfer( - net_log_, NetLog::TYPE_SOCKET_BYTES_SENT, nwrite, buf->data()); + net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, nwrite, + buf->data()); return nwrite; } if (errno != EAGAIN && errno != EWOULDBLOCK) @@ -629,8 +629,8 @@ void TCPClientSocketLibevent::DidCompleteRead() { read_bytes.Add(bytes_transferred); if (bytes_transferred > 0) use_history_.set_was_used_to_convey_data(); - LogByteTransfer(net_log_, NetLog::TYPE_SOCKET_BYTES_RECEIVED, result, - read_buf_->data()); + net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED, result, + read_buf_->data()); } else { result = MapSystemError(errno); } @@ -656,8 +656,8 @@ void TCPClientSocketLibevent::DidCompleteWrite() { write_bytes.Add(bytes_transferred); if (bytes_transferred > 0) use_history_.set_was_used_to_convey_data(); - LogByteTransfer(net_log_, NetLog::TYPE_SOCKET_BYTES_SENT, result, - write_buf_->data()); + net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, result, + write_buf_->data()); } else { result = MapSystemError(errno); } |