Chromium Code Reviews| Index: net/socket/ssl_client_socket.h |
| diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h |
| index 0e32ed6d39e27cd60e6f928d4a03a7857113c786..f252149385c407dcaf5de5af9916b5910e0ff740 100644 |
| --- a/net/socket/ssl_client_socket.h |
| +++ b/net/socket/ssl_client_socket.h |
| @@ -79,6 +79,14 @@ class NET_EXPORT SSLClientSocket : public SSLSocket { |
| // the first protocol in our list. |
| }; |
| + // TLS extension used to negotiate protocol. Recorded in UMA, do not change |
| + // or reuse values. |
|
davidben
2014/10/03 17:55:07
This comment seems no longer accurate (they don't
Bence
2014/10/10 15:26:11
Done.
|
| + enum SSLNegotiationExtension { |
| + kExtensionUnknown, |
| + kExtensionALPN, |
| + kExtensionNPN, |
| + }; |
| + |
| // StreamSocket: |
| virtual bool WasNpnNegotiated() const OVERRIDE; |
| virtual NextProto GetNegotiatedProtocol() const OVERRIDE; |
| @@ -150,6 +158,8 @@ class NET_EXPORT SSLClientSocket : public SSLSocket { |
| virtual void set_protocol_negotiated(NextProto protocol_negotiated); |
| + void set_negotiation_extension(SSLNegotiationExtension negotiation_extension); |
| + |
| // Returns the ChannelIDService used by this socket, or NULL if |
| // channel ids are not supported. |
| virtual ChannelIDService* GetChannelIDService() const = 0; |
| @@ -162,6 +172,10 @@ class NET_EXPORT SSLClientSocket : public SSLSocket { |
| // Public for ssl_client_socket_openssl_unittest.cc. |
| virtual bool WasChannelIDSent() const; |
| + // Record which TLS extension was used to negotiate protocol and protocol |
| + // chosen in a UMA histogram. |
| + void RecordNegotiationExtension(); |
| + |
| protected: |
| virtual void set_channel_id_sent(bool channel_id_sent); |
| @@ -219,6 +233,8 @@ class NET_EXPORT SSLClientSocket : public SSLSocket { |
| bool signed_cert_timestamps_received_; |
| // True if a stapled OCSP response was received. |
| bool stapled_ocsp_response_received_; |
| + // Protocol negotiation extension used. |
| + enum SSLNegotiationExtension negotiation_extension_; |
|
davidben
2014/10/03 17:55:07
Nit: No 'enum' prefix in C++.
Bence
2014/10/10 15:26:11
Done.
|
| }; |
| } // namespace net |