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

Unified Diff: net/socket/tcp_client_socket.h

Issue 1376473003: Notify NQE of TCP RTT values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder initialization in constructor Created 4 years, 8 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
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | net/socket/tcp_client_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_client_socket.h
diff --git a/net/socket/tcp_client_socket.h b/net/socket/tcp_client_socket.h
index ae6083fed6c5b353c0295dc84650a5a9836ba5b2..ddda0a6431f867965478ab794433541f951052b1 100644
--- a/net/socket/tcp_client_socket.h
+++ b/net/socket/tcp_client_socket.h
@@ -20,15 +20,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.
@@ -104,6 +108,13 @@ 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.
+ // |socket_performance_watcher_| is owned by |socket_|. If non-null,
+ // |socket_performance_watcher_| is guaranteed to be destroyed when |socket_|
+ // is destroyed.
+ SocketPerformanceWatcher* socket_performance_watcher_;
+
scoped_ptr<TCPSocket> socket_;
// Local IP address and port we are bound to. Set to NULL if Bind()
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | net/socket/tcp_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698