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

Unified Diff: net/socket/tcp_server_socket_win.cc

Issue 10546162: NetLogEventParameter to Callback refactoring 9. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update comment Created 8 years, 6 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
Index: net/socket/tcp_server_socket_win.cc
===================================================================
--- net/socket/tcp_server_socket_win.cc (revision 142108)
+++ net/socket/tcp_server_socket_win.cc (working copy)
@@ -11,6 +11,7 @@
#include "net/base/net_util.h"
#include "net/base/winsock_init.h"
#include "net/base/winsock_util.h"
+#include "net/socket/socket_net_log_params.h"
#include "net/socket/tcp_client_socket.h"
namespace net {
@@ -21,16 +22,14 @@
socket_event_(WSA_INVALID_EVENT),
accept_socket_(NULL),
net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_SOCKET)) {
- scoped_refptr<NetLog::EventParameters> params;
- if (source.is_valid())
- params = new NetLogSourceParameter("source_dependency", source);
- net_log_.BeginEvent(NetLog::TYPE_SOCKET_ALIVE, params);
+ net_log_.BeginEvent(NetLog::TYPE_SOCKET_ALIVE,
+ source.ToEventParametersCallback());
EnsureWinsockInit();
}
TCPServerSocketWin::~TCPServerSocketWin() {
Close();
- net_log_.EndEvent(NetLog::TYPE_SOCKET_ALIVE, NULL);
+ net_log_.EndEvent(NetLog::TYPE_SOCKET_ALIVE);
}
int TCPServerSocketWin::Listen(const IPEndPoint& address, int backlog) {
@@ -100,7 +99,7 @@
DCHECK(!callback.is_null());
DCHECK(accept_callback_.is_null());
- net_log_.BeginEvent(NetLog::TYPE_TCP_ACCEPT, NULL);
+ net_log_.BeginEvent(NetLog::TYPE_TCP_ACCEPT);
int result = AcceptInternal(socket);
@@ -146,8 +145,7 @@
}
socket->reset(tcp_socket.release());
net_log_.EndEvent(NetLog::TYPE_TCP_ACCEPT,
- make_scoped_refptr(new NetLogStringParameter(
- "address", address.ToString())));
+ CreateNetLogIPEndPointCallback(&address));
return OK;
}

Powered by Google App Engine
This is Rietveld 408576698