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

Unified Diff: net/base/socket_performance_watcher_factory.h

Issue 1672513002: Expose packet loss counts from QUIC to NetworkQualityEstimator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed bengr comments Created 4 years, 10 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/base/socket_performance_watcher_factory.h
diff --git a/net/base/socket_performance_watcher_factory.h b/net/base/socket_performance_watcher_factory.h
index cbd607ab3366cbba1e24dea1a6dcaab205dd8320..5e9e30e7dec627e1304545ed0dbeca71f803404e 100644
--- a/net/base/socket_performance_watcher_factory.h
+++ b/net/base/socket_performance_watcher_factory.h
@@ -5,6 +5,8 @@
#ifndef NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_
#define NET_BASE_SOCKET_PERFORMANCE_WATCHER_FACTORY_H_
+#include <stdint.h>
+
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "net/base/net_export.h"
@@ -42,6 +44,37 @@ class NET_EXPORT_PRIVATE SocketPerformanceWatcherFactory {
virtual void OnUpdatedRTTAvailable(const Protocol protocol,
const base::TimeDelta& rtt) = 0;
+ // Called when an updated packet count at the transport layer is available.
+ // |protocol| is the protocol that was used by the watcher.
+ // |num_packets_lost| is the number of packets lost.
+ // |num_packets_received_in_order| is the number of packets received in
+ // order. |num_packets_received_not_in_order| is the number of packets
+ // received out of order. All the counts are since the last call to the
+ // OnUpdatedPacketCountAvailable. This method is called immediately after the
+ // observation is made, hence no timestamp.
+ //
+ // As an example, assume that the packets with sequence number 1, 2 and 5 have
bengr 2016/02/19 00:45:08 I would be much more concise here. See my earlier
tbansal1 2016/02/26 01:15:00 Done.
+ // been received. Four cases are possible: (i) If next, a packet with sequence
+ // number 6 is received, then this function should be called with
+ // |num_packets_received_in_order| set to 1, and all other counts set to zero.
+ // (ii) If packet with sequence number 3 is received,
+ // |num_packets_received_not_in_order| should be set to 1, and all other
+ // counts
+ // should be zero.
+ // (iii) If packet with sequence number 2 is received again,
+ // |num_packets_received_not_in_order| should be set to 1, and all other
+ // counts
+ // should be zero.
+ // (iv) If packet with sequence number 10 is received,
+ // |num_packets_received_in_order| should be set to 1, |num_packets_lost|
+ // should be set to 4, and |num_packets_received_not_in_order| should be set
+ // to zero.
+ virtual void OnUpdatedPacketCountAvailable(
+ Protocol protocol,
+ uint64_t num_packets_lost,
+ uint64_t num_packets_received_in_order,
+ uint64_t num_packets_received_not_in_order) = 0;
+
protected:
SocketPerformanceWatcherFactory() {}

Powered by Google App Engine
This is Rietveld 408576698