| Index: net/socket/tcp_client_socket.h
|
| diff --git a/net/socket/tcp_client_socket.h b/net/socket/tcp_client_socket.h
|
| index 73ee62bfeb29d33403f7f9d0c43496ced3c69f0b..8d4bac19297b6e894f04e18949d37eedb5870c04 100644
|
| --- a/net/socket/tcp_client_socket.h
|
| +++ b/net/socket/tcp_client_socket.h
|
| @@ -10,6 +10,7 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "net/base/address_list.h"
|
| #include "net/base/completion_callback.h"
|
| #include "net/base/net_export.h"
|
| @@ -20,15 +21,19 @@
|
|
|
| namespace net {
|
|
|
| +class SocketPerformanceWatcher;
|
| +
|
| // A client socket that uses TCP as the transport layer.
|
| class NET_EXPORT TCPClientSocket : public StreamSocket {
|
| public:
|
| // The IP address(es) and port number to connect to. The TCP socket will try
|
| // each IP address in the list until it succeeds in establishing a
|
| // connection.
|
| - TCPClientSocket(const AddressList& addresses,
|
| - net::NetLog* net_log,
|
| - const net::NetLog::Source& source);
|
| + TCPClientSocket(
|
| + const AddressList& addresses,
|
| + scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher,
|
| + net::NetLog* net_log,
|
| + const net::NetLog::Source& source);
|
|
|
| // Adopts the given, connected socket and then acts as if Connect() had been
|
| // called. This function is used by TCPServerSocket and for testing.
|
| @@ -105,6 +110,10 @@ class NET_EXPORT TCPClientSocket : public StreamSocket {
|
| // disconnected.
|
| void EmitTCPMetricsHistogramsOnDisconnect();
|
|
|
| + // Socket performance statistics (such as RTT) are reported to the
|
| + // |socket_performance_watcher_|. May be nullptr.
|
| + base::WeakPtr<SocketPerformanceWatcher> socket_performance_watcher_;
|
| +
|
| scoped_ptr<TCPSocket> socket_;
|
|
|
| // Local IP address and port we are bound to. Set to NULL if Bind()
|
| @@ -136,6 +145,10 @@ class NET_EXPORT TCPClientSocket : public StreamSocket {
|
| // Total number of bytes received by the socket.
|
| int64_t total_received_bytes_;
|
|
|
| + // True if the |socket_performance_watcher_| should be notified that the
|
| + // socket has been reset.
|
| + bool notify_reset_socket_performance_watcher_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TCPClientSocket);
|
| };
|
|
|
|
|