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

Unified Diff: net/socket/tcp_client_socket_win.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/tcp_client_socket_pool.cc ('k') | net/socket_stream/socket_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_client_socket_win.cc
===================================================================
--- net/socket/tcp_client_socket_win.cc (revision 45828)
+++ net/socket/tcp_client_socket_win.cc (working copy)
@@ -288,7 +288,7 @@
TCPClientSocketWin::~TCPClientSocketWin() {
Disconnect();
- net_log_.AddEvent(NetLog::TYPE_TCP_SOCKET_DONE);
+ net_log_.AddEvent(NetLog::TYPE_TCP_SOCKET_DONE, NULL);
}
int TCPClientSocketWin::Connect(CompletionCallback* callback) {
@@ -301,7 +301,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();
@@ -313,7 +313,7 @@
read_callback_ = callback;
} else {
TRACE_EVENT_END("socket.connect", this, "");
- net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT);
+ net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, NULL);
if (rv == OK)
UpdateConnectionTypeHistograms(CONNECTION_ANY);
}
@@ -477,8 +477,8 @@
base::MemoryDebug::MarkAsInitialized(core_->read_buffer_.buf, num);
static StatsCounter read_bytes("tcp.read_bytes");
read_bytes.Add(num);
- net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
- "num_bytes", num);
+ net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
+ new NetLogIntegerParameter("num_bytes", num));
return static_cast<int>(num);
}
} else {
@@ -529,8 +529,8 @@
TRACE_EVENT_END("socket.write", this, StringPrintf("%d bytes", rv));
static StatsCounter write_bytes("tcp.write_bytes");
write_bytes.Add(rv);
- net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_SENT,
- "num_bytes", rv);
+ net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_SENT,
+ new NetLogIntegerParameter("num_bytes", rv));
return rv;
}
} else {
@@ -663,18 +663,18 @@
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(read_callback_);
} else {
result = MapConnectError(os_error);
TRACE_EVENT_END("socket.connect", this, "");
- net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT);
+ net_log_.EndEvent(NetLog::TYPE_TCP_CONNECT, NULL);
}
} else {
NOTREACHED();
result = ERR_UNEXPECTED;
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) {
@@ -694,8 +694,8 @@
waiting_read_ = false;
core_->read_iobuffer_ = NULL;
if (ok) {
- net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
- "num_bytes", num_bytes);
+ net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_RECEIVED,
+ new NetLogIntegerParameter("num_bytes", num_bytes));
}
DoReadCallback(ok ? num_bytes : MapWinsockError(WSAGetLastError()));
}
@@ -722,8 +722,8 @@
<< " bytes reported.";
rv = ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES;
} else {
- net_log_.AddEventWithInteger(NetLog::TYPE_SOCKET_BYTES_SENT,
- "num_bytes", rv);
+ net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_SENT,
+ new NetLogIntegerParameter("num_bytes", rv));
}
}
core_->write_iobuffer_ = NULL;
« no previous file with comments | « net/socket/tcp_client_socket_pool.cc ('k') | net/socket_stream/socket_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698