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

Unified Diff: net/base/socket_performance_watcher.h

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed rsleevi 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.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_;

Powered by Google App Engine
This is Rietveld 408576698