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

Unified Diff: net/socket/stream_socket.h

Issue 1096203006: Collect all ConnectionAttempts from both sockets in TransportConnectJob. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domrel_serverip1
Patch Set: Make requested changes; rebase Created 5 years, 7 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_server_socket_unittest.cc ('k') | net/socket/stream_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/stream_socket.h
diff --git a/net/socket/stream_socket.h b/net/socket/stream_socket.h
index 30a199e2dc3c9f24e3ec07ac583209b38ef1c9e4..ef6d9ed869f95c2adfbf66761437ef74ebbce3cf 100644
--- a/net/socket/stream_socket.h
+++ b/net/socket/stream_socket.h
@@ -6,6 +6,7 @@
#define NET_SOCKET_STREAM_SOCKET_H_
#include "net/log/net_log.h"
+#include "net/socket/connection_attempts.h"
#include "net/socket/next_proto.h"
#include "net/socket/socket.h"
@@ -17,7 +18,7 @@ class SSLInfo;
class NET_EXPORT_PRIVATE StreamSocket : public Socket {
public:
- ~StreamSocket() override {}
+ ~StreamSocket() override;
// Called to establish a connection. Returns OK if the connection could be
// established synchronously. Otherwise, ERR_IO_PENDING is returned and the
@@ -95,6 +96,20 @@ class NET_EXPORT_PRIVATE StreamSocket : public Socket {
// SSL was not used by this socket.
virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0;
+ // Overwrites |out| with the connection attempts made in the process of
+ // connecting this socket.
+ virtual void GetConnectionAttempts(ConnectionAttempts* out) const = 0;
+
+ // Clears the connection attempts. (Called when the socket is being reused
+ // so the second and later owners don't see the attempts made to obtain it
+ // for the first owner.)
Randy Smith (Not in Mondays) 2015/05/14 19:42:05 I'd remove the parenthesis; it's about the consume
Deprecated (see juliatuttle) 2015/05/14 20:02:35 Done.
+ virtual void ClearConnectionAttempts() = 0;
+
+ // Adds |attempts| to the connection attempts. (Called when the socket is
+ // being returned from the connect job to include connection attempts made on
+ // the fallback [or main, if this was the fallback] socket.)
Randy Smith (Not in Mondays) 2015/05/14 19:42:05 Same comment about parenthetical, and similar but
Deprecated (see juliatuttle) 2015/05/14 20:02:35 Done.
+ virtual void AddConnectionAttempts(const ConnectionAttempts& attempts) = 0;
+
protected:
// The following class is only used to gather statistics about the history of
// a socket. It is only instantiated and used in basic sockets, such as
« no previous file with comments | « net/socket/ssl_server_socket_unittest.cc ('k') | net/socket/stream_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698