Index: net/base/socket_performance_watcher.h |
diff --git a/net/base/socket_performance_watcher.h b/net/base/socket_performance_watcher.h |
index e0e76327ce63541e8d0dc2ba23215d34f953df41..b31d3b4ba7852e984f006e1e39c1892791775936 100644 |
--- a/net/base/socket_performance_watcher.h |
+++ b/net/base/socket_performance_watcher.h |
@@ -6,6 +6,7 @@ |
#define NET_BASE_SOCKET_PERFORMANCE_WATCHER_H_ |
#include "base/macros.h" |
+#include "base/time/time.h" |
#include "net/base/net_export.h" |
#include "net/base/socket_performance_watcher_factory.h" |
@@ -33,10 +34,26 @@ class NET_EXPORT_PRIVATE SocketPerformanceWatcher { |
// made, hence no timestamp. |
void OnUpdatedRTTAvailable(const base::TimeDelta& rtt) const; |
+ base::TimeDelta rtt_notification_interval() const { |
+ // TODO(tbansal): TCP/QUIC start with a hard-coded RTT estimate, and |
+ // converge to a more accurate value as more packets are received. This |
+ // function should be changed to return 0 seconds until this connection |
+ // has received 15 packets. Afterwards, it should return 2 seconds. |
Ryan Sleevi
2016/02/25 22:48:46
Why not return this as a "const base::TimeDelta&"
tbansal1
2016/02/26 23:43:34
I think mmenke said at one point that it is okay t
|
+ return rtt_notification_interval_; |
+ } |
+ |
+ // Called when |this| socket performance watcher is reused for establishing a |
+ // new transport layer connection. |
+ void Reset() const; |
+ |
private: |
// Transport layer protocol used by the socket that |this| is watching. |
const SocketPerformanceWatcherFactory::Protocol protocol_; |
+ // Minimum time interval between two successive OnUpdatedRTTAvailable |
+ // notifications to |this|. |
+ const base::TimeDelta rtt_notification_interval_; |
+ |
// |socket_performance_watcher_factory_| is the factory that created |
// |this| watcher. |
SocketPerformanceWatcherFactory* socket_performance_watcher_factory_; |