| Index: net/socket/tcp_socket_posix.h
|
| diff --git a/net/socket/tcp_socket_posix.h b/net/socket/tcp_socket_posix.h
|
| index 8d53caf567f38b96b6abfba189592b20865d7cff..165b9d74557db900acb17a8c4a6e99e30f7b9d8b 100644
|
| --- a/net/socket/tcp_socket_posix.h
|
| +++ b/net/socket/tcp_socket_posix.h
|
| @@ -15,6 +15,7 @@
|
| #include "net/base/address_family.h"
|
| #include "net/base/completion_callback.h"
|
| #include "net/base/net_export.h"
|
| +#include "net/base/socket_performance_watcher.h"
|
| #include "net/log/net_log.h"
|
|
|
| namespace net {
|
| @@ -26,7 +27,10 @@ class SocketPosix;
|
|
|
| class NET_EXPORT TCPSocketPosix {
|
| public:
|
| - TCPSocketPosix(NetLog* net_log, const NetLog::Source& source);
|
| + TCPSocketPosix(
|
| + scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
|
| + NetLog* net_log,
|
| + const NetLog::Source& source);
|
| virtual ~TCPSocketPosix();
|
|
|
| int Open(AddressFamily family);
|
| @@ -179,7 +183,7 @@ class NET_EXPORT TCPSocketPosix {
|
| int BuildTcpSocketPosix(scoped_ptr<TCPSocketPosix>* tcp_socket,
|
| IPEndPoint* address);
|
|
|
| - void ConnectCompleted(const CompletionCallback& callback, int rv) const;
|
| + void ConnectCompleted(const CompletionCallback& callback, int rv);
|
| int HandleConnectCompleted(int rv) const;
|
| void LogConnectBegin(const AddressList& addresses) const;
|
| void LogConnectEnd(int net_error) const;
|
| @@ -197,12 +201,24 @@ class NET_EXPORT TCPSocketPosix {
|
| int buf_len,
|
| const CompletionCallback& callback);
|
|
|
| + // Notifies |socket_performance_watcher_| of the latest RTT estimate available
|
| + // from the tcp_info struct for this TCP socket.
|
| + void NotifySocketPerformanceWatcher();
|
| +
|
| // Called after the first read completes on a TCP FastOpen socket.
|
| void UpdateTCPFastOpenStatusAfterRead();
|
|
|
| scoped_ptr<SocketPosix> socket_;
|
| scoped_ptr<SocketPosix> accept_socket_;
|
|
|
| + // Socket performance statistics (such as RTT) are reported to the
|
| + // |socket_performance_watcher_|. May be nullptr.
|
| + scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
|
| +
|
| + // Last time when |socket_performance_watcher_| was last notified of RTT
|
| + // statistics.
|
| + base::TimeTicks last_socket_performance_watcher_rtt_notify_;
|
| +
|
| // Enables experimental TCP FastOpen option.
|
| bool use_tcp_fastopen_;
|
|
|
|
|