Implement ALPS in SSLClientSocketImpl and SSLServerSocketImpl.

Change-Id: I6e15414d2b591781da0103384018575e80eb81a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2650785
Commit-Queue: Bence Béky <[email protected]>
Reviewed-by: David Benjamin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#851757}
diff --git a/net/ssl/ssl_server_config.h b/net/ssl/ssl_server_config.h
index 6f2b65d..4a00fd2 100644
--- a/net/ssl/ssl_server_config.h
+++ b/net/ssl/ssl_server_config.h
@@ -9,6 +9,7 @@
 
 #include <vector>
 
+#include "base/containers/flat_map.h"
 #include "base/optional.h"
 #include "net/base/net_export.h"
 #include "net/socket/next_proto.h"
@@ -99,6 +100,11 @@
   // will be advertised in this order during TLS handshake.
   NextProtoVector alpn_protos;
 
+  // ALPS TLS extension is enabled and corresponding data is sent to client if
+  // client also enabled ALPS, for each NextProto in |application_settings|.
+  // Data might be empty.
+  base::flat_map<NextProto, std::vector<uint8_t>> application_settings;
+
   // If non-empty, the DER-encoded OCSP response to staple.
   std::vector<uint8_t> ocsp_response;
 };