summaryrefslogtreecommitdiffstats
path: root/net/socket/tcp_client_socket_libevent.cc
diff options
context:
space:
mode:
authormmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-01 21:15:19 +0000
committermmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-01 21:15:19 +0000
commit267a0d66d9ff4da5043c4c2a1bf0db55d2221d50 (patch)
tree842402558664153742c3bb22d8158a2b948238ae /net/socket/tcp_client_socket_libevent.cc
parentdc8bb584a5fa7595378f963e98164fb9f4e2c421 (diff)
downloadchromium_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.cc16
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);
}