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

Unified Diff: net/socket/tcp_client_socket_libevent.cc

Issue 1716007: Cleanup: Address some of the todos in net_log.h... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address willchan's comments Created 10 years, 8 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/socks5_client_socket.cc ('k') | net/socket/tcp_client_socket_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_client_socket_libevent.cc
===================================================================
--- net/socket/tcp_client_socket_libevent.cc (revision 45472)
+++ net/socket/tcp_client_socket_libevent.cc (working copy)
@@ -277,7 +277,8 @@
int nread = HANDLE_EINTR(read(socket_, buf->data(), buf_len));
if (nread >= 0) {
TRACE_EVENT_END("socket.read", this, StringPrintf("%d bytes", nread));
- net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_RECEIVED, nread);
+ net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
+ "num_bytes", nread);
return nread;
}
if (errno != EAGAIN && errno != EWOULDBLOCK) {
@@ -312,7 +313,8 @@
int nwrite = HANDLE_EINTR(write(socket_, buf->data(), buf_len));
if (nwrite >= 0) {
TRACE_EVENT_END("socket.write", this, StringPrintf("%d bytes", nwrite));
- net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_SENT, nwrite);
+ net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_SENT,
+ "num_bytes", nwrite);
return nwrite;
}
if (errno != EAGAIN && errno != EWOULDBLOCK)
@@ -432,7 +434,8 @@
TRACE_EVENT_END("socket.read", this,
StringPrintf("%d bytes", bytes_transferred));
result = bytes_transferred;
- net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_RECEIVED, result);
+ net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
+ "num_bytes", result);
} else {
result = MapPosixError(errno);
}
@@ -456,7 +459,8 @@
result = bytes_transferred;
TRACE_EVENT_END("socket.write", this,
StringPrintf("%d bytes", bytes_transferred));
- net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_SENT, result);
+ net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_SENT,
+ "num_bytes", result);
} else {
result = MapPosixError(errno);
}
« no previous file with comments | « net/socket/socks5_client_socket.cc ('k') | net/socket/tcp_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698