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

Unified Diff: net/socket/tcp_client_socket_libevent.cc

Issue 1746012: More cleanup of net_log.h (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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/ssl_client_socket_win.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 45828)
+++ net/socket/tcp_client_socket_libevent.cc (working copy)
@@ -137,7 +137,7 @@
TCPClientSocketLibevent::~TCPClientSocketLibevent() {
Disconnect();
- net_log_.AddEvent(NetLog::TYPE_TCP_SOCKET_DONE);
+ net_log_.AddEvent(NetLog::TYPE_TCP_SOCKET_DONE, NULL);
}
int TCPClientSocketLibevent::Connect(CompletionCallback* callback) {
@@ -149,7 +149,7 @@
TRACE_EVENT_BEGIN("socket.connect", this, "");
- net_log_.BeginEvent(NetLog::TYPE_TCP_CONNECT);
+ net_log_.BeginEvent(NetLog::TYPE_TCP_CONNECT, NULL);
int rv = DoConnect();
@@ -161,7 +161,7 @@
write_callback_ = callback;
} else {
TRACE_EVENT_END("socket.connect", this, "");
- net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT);
+ net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, NULL);
}
return rv;
@@ -277,8 +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,
- "num_bytes", nread);
+ net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
+ new NetLogIntegerParameter("num_bytes", nread));
return nread;
}
if (errno != EAGAIN && errno != EWOULDBLOCK) {
@@ -313,8 +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,
- "num_bytes", nwrite);
+ net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_SENT,
+ new NetLogIntegerParameter("num_bytes", nwrite));
return nwrite;
}
if (errno != EAGAIN && errno != EWOULDBLOCK)
@@ -408,7 +408,7 @@
Disconnect();
current_ai_ = next;
TRACE_EVENT_END("socket.connect", this, "");
- net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT);
+ net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, NULL);
result = Connect(write_callback_);
} else {
result = MapConnectError(os_error);
@@ -416,7 +416,7 @@
DCHECK(ok);
waiting_connect_ = false;
TRACE_EVENT_END("socket.connect", this, "");
- net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT);
+ net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, NULL);
}
if (result != ERR_IO_PENDING) {
@@ -434,8 +434,8 @@
TRACE_EVENT_END("socket.read", this,
StringPrintf("%d bytes", bytes_transferred));
result = bytes_transferred;
- net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
- "num_bytes", result);
+ net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
+ new NetLogIntegerParameter("num_bytes", result));
} else {
result = MapPosixError(errno);
}
@@ -459,8 +459,8 @@
result = bytes_transferred;
TRACE_EVENT_END("socket.write", this,
StringPrintf("%d bytes", bytes_transferred));
- net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_SENT,
- "num_bytes", result);
+ net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_SENT,
+ new NetLogIntegerParameter("num_bytes", result));
} else {
result = MapPosixError(errno);
}
« no previous file with comments | « net/socket/ssl_client_socket_win.cc ('k') | net/socket/tcp_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698