Chromium Code Reviews| 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 "net/log/net_log.h" | 8 #include "net/log/net_log.h" |
| 9 #include "net/socket/next_proto.h" | 9 #include "net/socket/next_proto.h" |
| 10 #include "net/socket/socket.h" | 10 #include "net/socket/socket.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 virtual bool WasNpnNegotiated() const = 0; | 88 virtual bool WasNpnNegotiated() const = 0; |
| 89 | 89 |
| 90 // Returns the protocol negotiated via NPN for this socket, or | 90 // Returns the protocol negotiated via NPN for this socket, or |
| 91 // kProtoUnknown will be returned if NPN is not applicable. | 91 // kProtoUnknown will be returned if NPN is not applicable. |
| 92 virtual NextProto GetNegotiatedProtocol() const = 0; | 92 virtual NextProto GetNegotiatedProtocol() const = 0; |
| 93 | 93 |
| 94 // Gets the SSL connection information of the socket. Returns false if | 94 // Gets the SSL connection information of the socket. Returns false if |
| 95 // SSL was not used by this socket. | 95 // SSL was not used by this socket. |
| 96 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0; | 96 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0; |
| 97 | 97 |
| 98 // If an SSL socket, configures whether renegotiations are allowed. By | |
| 99 // default, the socket rejects all renegotiations from the peer. This method | |
| 100 // may be called after Connect completes to change this behavior. If enabled, | |
| 101 // ERR_SSL_CLIENT_AUTH_CERT_NEEDED may be returned from Read. | |
| 102 virtual void SetRenegotiationsAllowed(bool allowed) {} | |
|
Ryan Sleevi
2015/05/07 01:41:26
= 0
davidben
2015/05/07 19:12:34
Fiiiine. Well, you get to review it. FWIW, EnableT
| |
| 103 | |
| 98 protected: | 104 protected: |
| 99 // The following class is only used to gather statistics about the history of | 105 // 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 | 106 // a socket. It is only instantiated and used in basic sockets, such as |
| 101 // TCPClientSocket* instances. Other classes that are derived from | 107 // TCPClientSocket* instances. Other classes that are derived from |
| 102 // StreamSocket should forward any potential settings to their underlying | 108 // StreamSocket should forward any potential settings to their underlying |
| 103 // transport sockets. | 109 // transport sockets. |
| 104 class UseHistory { | 110 class UseHistory { |
| 105 public: | 111 public: |
| 106 UseHistory(); | 112 UseHistory(); |
| 107 ~UseHistory(); | 113 ~UseHistory(); |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 134 // identify the motivation. | 140 // identify the motivation. |
| 135 bool omnibox_speculation_; | 141 bool omnibox_speculation_; |
| 136 bool subresource_speculation_; | 142 bool subresource_speculation_; |
| 137 DISALLOW_COPY_AND_ASSIGN(UseHistory); | 143 DISALLOW_COPY_AND_ASSIGN(UseHistory); |
| 138 }; | 144 }; |
| 139 }; | 145 }; |
| 140 | 146 |
| 141 } // namespace net | 147 } // namespace net |
| 142 | 148 |
| 143 #endif // NET_SOCKET_STREAM_SOCKET_H_ | 149 #endif // NET_SOCKET_STREAM_SOCKET_H_ |
| OLD | NEW |