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

Unified Diff: net/socket/ssl_client_socket.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « net/socket/ssl_client_socket.h ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket.cc
diff --git a/net/socket/ssl_client_socket.cc b/net/socket/ssl_client_socket.cc
index da2d6ba0c8d8a88fabe6ba53519e0b69f07e5926..269ca7ee6f34b14d29a5e8d090696eb0f9d74919 100644
--- a/net/socket/ssl_client_socket.cc
+++ b/net/socket/ssl_client_socket.cc
@@ -8,9 +8,11 @@
#include "base/metrics/sparse_histogram.h"
#include "base/strings/string_util.h"
#include "crypto/ec_private_key.h"
+#include "net/base/connection_type_histograms.h"
#include "net/base/host_port_pair.h"
#include "net/ssl/channel_id_service.h"
#include "net/ssl/ssl_config_service.h"
+#include "net/ssl/ssl_connection_status_flags.h"
namespace net {
@@ -35,8 +37,8 @@ NextProto SSLClientSocket::NextProtoFromString(
return kProtoSPDY3;
} else if (proto_string == "spdy/3.1") {
return kProtoSPDY31;
- } else if (proto_string == "h2-14") {
- // This is the HTTP/2 draft 14 identifier. For internal
+ } else if (proto_string == "h2-15") {
+ // This is the HTTP/2 draft-15 identifier. For internal
// consistency, HTTP/2 is named SPDY4 within Chromium.
return kProtoSPDY4;
} else if (proto_string == "quic/1+spdy/3") {
@@ -58,9 +60,9 @@ const char* SSLClientSocket::NextProtoToString(NextProto next_proto) {
case kProtoSPDY31:
return "spdy/3.1";
case kProtoSPDY4:
- // This is the HTTP/2 draft 14 identifier. For internal
+ // This is the HTTP/2 draft-15 identifier. For internal
// consistency, HTTP/2 is named SPDY4 within Chromium.
- return "h2-14";
+ return "h2-15";
case kProtoQUIC1SPDY3:
return "quic/1+spdy/3";
case kProtoUnknown:
@@ -182,6 +184,28 @@ void SSLClientSocket::RecordChannelIDSupport(
}
// static
+void SSLClientSocket::RecordConnectionTypeMetrics(int ssl_version) {
+ UpdateConnectionTypeHistograms(CONNECTION_SSL);
+ switch (ssl_version) {
+ case SSL_CONNECTION_VERSION_SSL2:
+ UpdateConnectionTypeHistograms(CONNECTION_SSL_SSL2);
+ break;
+ case SSL_CONNECTION_VERSION_SSL3:
+ UpdateConnectionTypeHistograms(CONNECTION_SSL_SSL3);
+ break;
+ case SSL_CONNECTION_VERSION_TLS1:
+ UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1);
+ break;
+ case SSL_CONNECTION_VERSION_TLS1_1:
+ UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1_1);
+ break;
+ case SSL_CONNECTION_VERSION_TLS1_2:
+ UpdateConnectionTypeHistograms(CONNECTION_SSL_TLS1_2);
+ break;
+ }
+}
+
+// static
bool SSLClientSocket::IsChannelIDEnabled(
const SSLConfig& ssl_config,
ChannelIDService* channel_id_service) {
« no previous file with comments | « net/socket/ssl_client_socket.h ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698