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

Unified Diff: net/socket/ssl_client_socket.h

Issue 1371263002: Refactor SSLClientSocket::SerializeNextProtos(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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_nss.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 67800602ee4c3ec24f4989c20b067ff36a9c7d7b..595bc4338116c01c64a67aec5a1a5efe97e6ba60 100644
--- a/net/socket/ssl_client_socket.h
+++ b/net/socket/ssl_client_socket.h
@@ -178,14 +178,16 @@ class NET_EXPORT SSLClientSocket : public SSLSocket {
// inadequate TLS version.
static bool IsTLSVersionAdequateForHTTP2(const SSLConfig& ssl_config);
- // Serializes |next_protos| in the wire format for ALPN: protocols are listed
- // in order, each prefixed by a one-byte length. Any HTTP/2 protocols in
- // |next_protos| are ignored if |can_advertise_http2| is false.
+ // Remove HTTP/2 from |next_protos|.
+ static void DisableHTTP2(NextProtoVector* next_protos);
davidben 2015/09/28 22:16:22 Do you think this should perhaps be in next_proto.
Bence 2015/09/28 23:55:52 Great idea! Especially because I might end up usi
+
+ // Serialize |next_protos| in the wire format for ALPN and NPN: protocols are
+ // listed in order, each prefixed by a one-byte length.
static std::vector<uint8_t> SerializeNextProtos(
- const NextProtoVector& next_protos,
- bool can_advertise_http2);
+ const NextProtoVector& next_protos);
private:
+ FRIEND_TEST_ALL_PREFIXES(SSLClientSocket, DisableHTTP2);
FRIEND_TEST_ALL_PREFIXES(SSLClientSocket, SerializeNextProtos);
// For signed_cert_timestamps_received_ and stapled_ocsp_response_received_.
FRIEND_TEST_ALL_PREFIXES(SSLClientSocketTest,
« no previous file with comments | « no previous file | net/socket/ssl_client_socket.cc » ('j') | net/socket/ssl_client_socket_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698