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

Unified Diff: net/socket/ssl_client_socket.h

Issue 353713005: Implements new, more robust design for communicating between SSLConnectJobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implemented better memory management and callback handling. Created 6 years, 5 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
Index: net/socket/ssl_client_socket.h
diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h
index a43e58cc26b852fb86d92a1a5ac7c4e7c357b286..fb1f2f215bcd380a8cd3a25b63e779c46bb299c1 100644
--- a/net/socket/ssl_client_socket.h
+++ b/net/socket/ssl_client_socket.h
@@ -81,6 +81,29 @@ class NET_EXPORT SSLClientSocket : public SSLSocket {
virtual bool WasNpnNegotiated() const OVERRIDE;
virtual NextProto GetNegotiatedProtocol() const OVERRIDE;
+ // Formats a unique key for the SSL session cache. This method
+ // is necessary so that all classes create cache keys in a consistent
+ // manner.
+ static std::string FormatSessionCacheKey(
wtc 2014/07/15 19:27:58 Please add a TODO comment that this method will be
mshelley 2014/07/17 00:28:44 Done.
+ const std::string& host_and_port,
+ const std::string& ssl_session_cache_shard);
+
+ // Returns true if there is a cache entry in the ssl session cache
+ // for the cache key of the SSL socket.
+ //
+ // The cache key consists of a host and port concatenated with a session
+ // cache shard. These two strings are passed to the constructor of most
+ // subclasses
+ // of SSLClientSocket.
wtc 2014/07/15 19:27:58 Move this to the previous line. (Unfortunately "gi
mshelley 2014/07/17 00:28:44 Done.
+ virtual bool InSessionCache() const = 0;
+
+ // Tells the session cache to monitor this socket's session and inform
+ // its SSLConnectJobMessenger upon the session's handshake's completion.
wtc 2014/07/15 19:27:58 upon the session's handshake's completion => upon
mshelley 2014/07/17 00:28:44 Done.
+ virtual void SetHandshakeSuccessCallback(const base::Closure& callback) = 0;
+
+ // Sets the callback to be used if the socket's ssl handshake should fail.
+ virtual void SetHandshakeFailureCallback(const base::Closure& callback) = 0;
+
// Gets the SSL CertificateRequest info of the socket after Connect failed
// with ERR_SSL_CLIENT_AUTH_CERT_NEEDED.
virtual void GetSSLCertRequestInfo(

Powered by Google App Engine
This is Rietveld 408576698