Chromium Code Reviews| 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..a9b133cdbf995618ba5205c86f4d140da9614ae3 100644 |
| --- a/net/base/socket_performance_watcher.h |
| +++ b/net/base/socket_performance_watcher.h |
| @@ -5,7 +5,9 @@ |
| #ifndef NET_BASE_SOCKET_PERFORMANCE_WATCHER_H_ |
| #define NET_BASE_SOCKET_PERFORMANCE_WATCHER_H_ |
| +#include "base/compiler_specific.h" |
| #include "base/macros.h" |
| +#include "base/time/time.h" |
| #include "net/base/net_export.h" |
| #include "net/base/socket_performance_watcher_factory.h" |
| @@ -31,12 +33,26 @@ class NET_EXPORT_PRIVATE SocketPerformanceWatcher { |
| // must be the transport layer RTT from this device to the remote transport |
| // layer endpoint. This method is called immediately after the observation is |
| // made, hence no timestamp. |
| - void OnUpdatedRTTAvailable(const base::TimeDelta& rtt) const; |
| + void OnUpdatedRTTAvailable(const base::TimeDelta& rtt); |
| + |
| + // Returns true if |this| can be notified of a new RTT value. |
|
Ryan Sleevi
2016/03/02 19:56:57
I'm not sure what this means?
tbansal1
2016/03/03 02:09:08
I renamed the function name, and edited the commen
|
| + bool CanNotifyRTT() const WARN_UNUSED_RESULT; |
| + |
| + // Called when |this| socket performance watcher is reused for establishing a |
| + // new transport layer connection. |
|
Ryan Sleevi
2016/03/02 19:56:57
https://google.github.io/styleguide/cppguide.html#
tbansal1
2016/03/03 02:09:08
Done.
|
| + void Reset() const; |
| private: |
| // Transport layer protocol used by the socket that |this| is watching. |
| const SocketPerformanceWatcherFactory::Protocol protocol_; |
| + // Time when the last RTT notification was received. |
| + base::TimeTicks last_rtt_notification_; |
| + |
| + // 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_; |