| OLD | NEW |
| 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 "base/time.h" | |
| 9 #include "net/base/net_log.h" | 8 #include "net/base/net_log.h" |
| 10 #include "net/socket/next_proto.h" | 9 #include "net/socket/next_proto.h" |
| 11 #include "net/socket/socket.h" | 10 #include "net/socket/socket.h" |
| 12 | 11 |
| 13 namespace net { | 12 namespace net { |
| 14 | 13 |
| 15 class AddressList; | 14 class AddressList; |
| 16 class IPEndPoint; | 15 class IPEndPoint; |
| 17 class SSLInfo; | 16 class SSLInfo; |
| 18 | 17 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 72 |
| 74 // Returns true if the underlying transport socket ever had any reads or | 73 // Returns true if the underlying transport socket ever had any reads or |
| 75 // writes. StreamSockets layered on top of transport sockets should forward | 74 // writes. StreamSockets layered on top of transport sockets should forward |
| 76 // this call to the transport socket. | 75 // this call to the transport socket. |
| 77 virtual bool WasEverUsed() const = 0; | 76 virtual bool WasEverUsed() const = 0; |
| 78 | 77 |
| 79 // Returns true if the underlying transport socket is using TCP FastOpen. | 78 // Returns true if the underlying transport socket is using TCP FastOpen. |
| 80 // TCP FastOpen is an experiment with sending data in the TCP SYN packet. | 79 // TCP FastOpen is an experiment with sending data in the TCP SYN packet. |
| 81 virtual bool UsingTCPFastOpen() const = 0; | 80 virtual bool UsingTCPFastOpen() const = 0; |
| 82 | 81 |
| 83 // Returns the number of bytes successfully read from this socket. | |
| 84 virtual int64 NumBytesRead() const = 0; | |
| 85 | |
| 86 // Returns the connection setup time of this socket. | |
| 87 virtual base::TimeDelta GetConnectTimeMicros() const = 0; | |
| 88 | |
| 89 // Returns true if NPN was negotiated during the connection of this socket. | 82 // Returns true if NPN was negotiated during the connection of this socket. |
| 90 virtual bool WasNpnNegotiated() const = 0; | 83 virtual bool WasNpnNegotiated() const = 0; |
| 91 | 84 |
| 92 // Returns the protocol negotiated via NPN for this socket, or | 85 // Returns the protocol negotiated via NPN for this socket, or |
| 93 // kProtoUnknown will be returned if NPN is not applicable. | 86 // kProtoUnknown will be returned if NPN is not applicable. |
| 94 virtual NextProto GetNegotiatedProtocol() const = 0; | 87 virtual NextProto GetNegotiatedProtocol() const = 0; |
| 95 | 88 |
| 96 // Gets the SSL connection information of the socket. Returns false if | 89 // Gets the SSL connection information of the socket. Returns false if |
| 97 // SSL was not used by this socket. | 90 // SSL was not used by this socket. |
| 98 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0; | 91 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // identify the motivation. | 129 // identify the motivation. |
| 137 bool omnibox_speculation_; | 130 bool omnibox_speculation_; |
| 138 bool subresource_speculation_; | 131 bool subresource_speculation_; |
| 139 DISALLOW_COPY_AND_ASSIGN(UseHistory); | 132 DISALLOW_COPY_AND_ASSIGN(UseHistory); |
| 140 }; | 133 }; |
| 141 }; | 134 }; |
| 142 | 135 |
| 143 } // namespace net | 136 } // namespace net |
| 144 | 137 |
| 145 #endif // NET_SOCKET_STREAM_SOCKET_H_ | 138 #endif // NET_SOCKET_STREAM_SOCKET_H_ |
| OLD | NEW |