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

Side by Side 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: Return fake ConnectionAttempt in MockTCPClientSocket 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 unified diff | Download patch
« no previous file with comments | « net/socket/ssl_server_socket_unittest.cc ('k') | net/socket/tcp_client_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SOCKET_STREAM_SOCKET_H_ 5 #ifndef NET_SOCKET_STREAM_SOCKET_H_
6 #define NET_SOCKET_STREAM_SOCKET_H_ 6 #define NET_SOCKET_STREAM_SOCKET_H_
7 7
8 #include "net/log/net_log.h" 8 #include "net/log/net_log.h"
9 #include "net/socket/connection_attempts.h"
9 #include "net/socket/next_proto.h" 10 #include "net/socket/next_proto.h"
10 #include "net/socket/socket.h" 11 #include "net/socket/socket.h"
11 12
12 namespace net { 13 namespace net {
13 14
14 class AddressList; 15 class AddressList;
15 class IPEndPoint; 16 class IPEndPoint;
16 class SSLInfo; 17 class SSLInfo;
17 18
18 class NET_EXPORT_PRIVATE StreamSocket : public Socket { 19 class NET_EXPORT_PRIVATE StreamSocket : public Socket {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 virtual bool WasNpnNegotiated() const = 0; 89 virtual bool WasNpnNegotiated() const = 0;
89 90
90 // Returns the protocol negotiated via NPN for this socket, or 91 // Returns the protocol negotiated via NPN for this socket, or
91 // kProtoUnknown will be returned if NPN is not applicable. 92 // kProtoUnknown will be returned if NPN is not applicable.
92 virtual NextProto GetNegotiatedProtocol() const = 0; 93 virtual NextProto GetNegotiatedProtocol() const = 0;
93 94
94 // Gets the SSL connection information of the socket. Returns false if 95 // Gets the SSL connection information of the socket. Returns false if
95 // SSL was not used by this socket. 96 // SSL was not used by this socket.
96 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0; 97 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0;
97 98
99 // Overwrites |out| with the connection attempts made in the process of
100 // connecting this socket.
101 virtual void GetConnectionAttempts(ConnectionAttempts* out) const = 0;
102
103 // Clears the socket's list of connection attempts.
104 virtual void ClearConnectionAttempts() = 0;
105
106 // Adds |attempts| to the socket's list of connection attempts.
107 virtual void AddConnectionAttempts(const ConnectionAttempts& attempts) = 0;
108
98 protected: 109 protected:
99 // The following class is only used to gather statistics about the history of 110 // The following class is only used to gather statistics about the history of
100 // a socket. It is only instantiated and used in basic sockets, such as 111 // a socket. It is only instantiated and used in basic sockets, such as
101 // TCPClientSocket* instances. Other classes that are derived from 112 // TCPClientSocket* instances. Other classes that are derived from
102 // StreamSocket should forward any potential settings to their underlying 113 // StreamSocket should forward any potential settings to their underlying
103 // transport sockets. 114 // transport sockets.
104 class UseHistory { 115 class UseHistory {
105 public: 116 public:
106 UseHistory(); 117 UseHistory();
107 ~UseHistory(); 118 ~UseHistory();
(...skipping 26 matching lines...) Expand all
134 // identify the motivation. 145 // identify the motivation.
135 bool omnibox_speculation_; 146 bool omnibox_speculation_;
136 bool subresource_speculation_; 147 bool subresource_speculation_;
137 DISALLOW_COPY_AND_ASSIGN(UseHistory); 148 DISALLOW_COPY_AND_ASSIGN(UseHistory);
138 }; 149 };
139 }; 150 };
140 151
141 } // namespace net 152 } // namespace net
142 153
143 #endif // NET_SOCKET_STREAM_SOCKET_H_ 154 #endif // NET_SOCKET_STREAM_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_server_socket_unittest.cc ('k') | net/socket/tcp_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698