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

Unified Diff: net/udp/udp_socket_libevent.cc

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/tools/quic/test_tools/quic_test_utils.cc ('k') | net/udp/udp_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/udp/udp_socket_libevent.cc
diff --git a/net/udp/udp_socket_libevent.cc b/net/udp/udp_socket_libevent.cc
index 9b1a9957189d968c3fed617ba02aa3ee7d13cb98..2dffff3a31090eafbda962472c2840d0d3ceca2e 100644
--- a/net/udp/udp_socket_libevent.cc
+++ b/net/udp/udp_socket_libevent.cc
@@ -24,6 +24,7 @@
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
#include "net/base/net_util.h"
+#include "net/base/network_activity_monitor.h"
#include "net/socket/socket_descriptor.h"
#include "net/udp/udp_net_log_parameters.h"
@@ -414,6 +415,7 @@ void UDPSocketLibevent::LogRead(int result,
base::StatsCounter read_bytes("udp.read_bytes");
read_bytes.Add(result);
+ NetworkActivityMonitor::GetInstance()->IncrementBytesReceived(result);
}
int UDPSocketLibevent::CreateSocket(int addr_family) {
@@ -458,6 +460,7 @@ void UDPSocketLibevent::LogWrite(int result,
base::StatsCounter write_bytes("udp.write_bytes");
write_bytes.Add(result);
+ NetworkActivityMonitor::GetInstance()->IncrementBytesSent(result);
}
int UDPSocketLibevent::InternalRecvFrom(IOBuffer* buf, int buf_len,
« no previous file with comments | « net/tools/quic/test_tools/quic_test_utils.cc ('k') | net/udp/udp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698