summaryrefslogtreecommitdiffstats
path: root/net/udp/udp_socket_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/udp/udp_socket_win.cc')
-rw-r--r--net/udp/udp_socket_win.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc
index 5ab63a5..7b7a528 100644
--- a/net/udp/udp_socket_win.cc
+++ b/net/udp/udp_socket_win.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/metrics/stats_counters.h"
#include "base/rand_util.h"
#include "net/base/io_buffer.h"
@@ -338,6 +339,7 @@ int UDPSocketWin::InternalConnect(const IPEndPoint& address) {
// else connect() does the DatagramSocket::DEFAULT_BIND
if (rv < 0) {
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.UdpSocketRandomBindErrorCode", rv);
Close();
return rv;
}
@@ -663,6 +665,8 @@ int UDPSocketWin::DoBind(const IPEndPoint& address) {
if (!address.ToSockAddr(storage.addr, &storage.addr_len))
return ERR_ADDRESS_INVALID;
int rv = bind(socket_, storage.addr, storage.addr_len);
+ if (rv < 0)
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Net.UdpSocketBindErrorFromWinOS", rv);
return rv < 0 ? MapSystemError(WSAGetLastError()) : rv;
}