// 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;
+ bool WasNpnNegotiated() const override;
+ NextProto GetNegotiatedProtocol() const override;
// Computes a unique key string for the SSL session cache.
virtual std::string GetSessionCacheKey() const = 0;
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;
// 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);
bool channel_id_enabled,
bool supports_ecc);
+ // Records ConnectionType histograms for a successful SSL connection.
+ static void RecordConnectionTypeMetrics(int ssl_version);
+
// Returns whether TLS channel ID is enabled.
static bool IsChannelIDEnabled(
const SSLConfig& ssl_config,
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