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

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: Rename protocol_negotation for clarity. 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
« no previous file with comments | « no previous file | net/socket/ssl_client_socket.cc » ('j') | net/socket/ssl_client_socket.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | net/socket/ssl_client_socket.cc » ('j') | net/socket/ssl_client_socket.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698