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

Unified Diff: net/socket/ssl_client_socket.h

Issue 590513002: Add histogram to track NPN/ALPN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: second round of comments. Created 6 years, 2 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
Index: net/socket/ssl_client_socket.h
diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h
index 98eb7741d7e51713a39199652219d5f3e7a21bca..8f40f8492e9936a16b5e1eeac8c7f16a998b61c5 100644
--- a/net/socket/ssl_client_socket.h
+++ b/net/socket/ssl_client_socket.h
@@ -79,6 +79,13 @@ class NET_EXPORT SSLClientSocket : public SSLSocket {
// the first protocol in our list.
};
+ // TLS extension used to negotiate protocol.
+ enum SSLNegotiationExtension {
+ kExtensionUnknown,
+ kExtensionALPN,
+ kExtensionNPN,
+ };
+
// StreamSocket:
virtual bool WasNpnNegotiated() const override;
virtual NextProto GetNegotiatedProtocol() const override;
@@ -150,6 +157,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 +171,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 +232,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.
+ SSLNegotiationExtension negotiation_extension_;
};
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698