Index: net/udp/udp_socket_win.cc |
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc |
index b8c3b5831a346be6cbdf0587b4604ce389676f2f..5b4ae145d37f9f9817f2786e81933f2556771c4c 100644 |
--- a/net/udp/udp_socket_win.cc |
+++ b/net/udp/udp_socket_win.cc |
@@ -24,6 +24,8 @@ |
#include "net/base/winsock_init.h" |
#include "net/base/winsock_util.h" |
#include "net/log/net_log.h" |
+#include "net/log/net_log_event_type.h" |
+#include "net/log/net_log_source_type.h" |
#include "net/socket/socket_descriptor.h" |
#include "net/udp/udp_net_log_parameters.h" |
@@ -255,11 +257,11 @@ UDPSocketWin::UDPSocketWin(DatagramSocket::BindType bind_type, |
read_iobuffer_len_(0), |
write_iobuffer_len_(0), |
recv_from_address_(NULL), |
- net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_UDP_SOCKET)), |
+ net_log_(BoundNetLog::Make(net_log, NetLogSourceType::UDP_SOCKET)), |
qos_handle_(NULL), |
qos_flow_id_(0) { |
EnsureWinsockInit(); |
- net_log_.BeginEvent(NetLog::TYPE_SOCKET_ALIVE, |
+ net_log_.BeginEvent(NetLogEventType::SOCKET_ALIVE, |
source.ToEventParametersCallback()); |
if (bind_type == DatagramSocket::RANDOM_BIND) |
DCHECK(!rand_int_cb.is_null()); |
@@ -267,7 +269,7 @@ UDPSocketWin::UDPSocketWin(DatagramSocket::BindType bind_type, |
UDPSocketWin::~UDPSocketWin() { |
Close(); |
- net_log_.EndEvent(NetLog::TYPE_SOCKET_ALIVE); |
+ net_log_.EndEvent(NetLogEventType::SOCKET_ALIVE); |
} |
int UDPSocketWin::Open(AddressFamily address_family) { |
@@ -355,7 +357,7 @@ int UDPSocketWin::GetLocalAddress(IPEndPoint* address) const { |
if (!local_address->FromSockAddr(storage.addr, storage.addr_len)) |
return ERR_ADDRESS_INVALID; |
local_address_.reset(local_address.release()); |
- net_log_.AddEvent(NetLog::TYPE_UDP_LOCAL_ADDRESS, |
+ net_log_.AddEvent(NetLogEventType::UDP_LOCAL_ADDRESS, |
CreateNetLogUDPConnectCallback( |
local_address_.get(), |
NetworkChangeNotifier::kInvalidNetworkHandle)); |
@@ -430,11 +432,11 @@ int UDPSocketWin::SendToOrWrite(IOBuffer* buf, |
int UDPSocketWin::Connect(const IPEndPoint& address) { |
DCHECK_NE(socket_, INVALID_SOCKET); |
net_log_.BeginEvent( |
- NetLog::TYPE_UDP_CONNECT, |
+ NetLogEventType::UDP_CONNECT, |
CreateNetLogUDPConnectCallback( |
&address, NetworkChangeNotifier::kInvalidNetworkHandle)); |
int rv = InternalConnect(address); |
- net_log_.EndEventWithNetErrorCode(NetLog::TYPE_UDP_CONNECT, rv); |
+ net_log_.EndEventWithNetErrorCode(NetLogEventType::UDP_CONNECT, rv); |
is_connected_ = (rv == OK); |
return rv; |
} |
@@ -701,13 +703,14 @@ void UDPSocketWin::LogRead(int result, |
const char* bytes, |
const IPEndPoint* address) const { |
if (result < 0) { |
- net_log_.AddEventWithNetErrorCode(NetLog::TYPE_UDP_RECEIVE_ERROR, result); |
+ net_log_.AddEventWithNetErrorCode(NetLogEventType::UDP_RECEIVE_ERROR, |
+ result); |
return; |
} |
if (net_log_.IsCapturing()) { |
net_log_.AddEvent( |
- NetLog::TYPE_UDP_BYTES_RECEIVED, |
+ NetLogEventType::UDP_BYTES_RECEIVED, |
CreateNetLogUDPDataTranferCallback(result, bytes, address)); |
} |
@@ -718,13 +721,13 @@ void UDPSocketWin::LogWrite(int result, |
const char* bytes, |
const IPEndPoint* address) const { |
if (result < 0) { |
- net_log_.AddEventWithNetErrorCode(NetLog::TYPE_UDP_SEND_ERROR, result); |
+ net_log_.AddEventWithNetErrorCode(NetLogEventType::UDP_SEND_ERROR, result); |
return; |
} |
if (net_log_.IsCapturing()) { |
net_log_.AddEvent( |
- NetLog::TYPE_UDP_BYTES_SENT, |
+ NetLogEventType::UDP_BYTES_SENT, |
CreateNetLogUDPDataTranferCallback(result, bytes, address)); |
} |