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

Unified Diff: net/socket/ssl_session_cache_openssl.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_session_cache_openssl.h
diff --git a/net/socket/ssl_session_cache_openssl.h b/net/socket/ssl_session_cache_openssl.h
index bbd9659641df062dc870880f805031006deddb59..5c8af64d62e806dc297e312e68442eeb01c1242c 100644
--- a/net/socket/ssl_session_cache_openssl.h
+++ b/net/socket/ssl_session_cache_openssl.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback_forward.h"
#include "net/base/net_export.h"
// Avoid including OpenSSL headers here.
@@ -113,6 +114,16 @@ class NET_EXPORT SSLSessionCacheOpenSSL {
// Return true iff a cached session was associated with the |ssl| connection.
bool SetSSLSessionWithKey(SSL* ssl, const std::string& cache_key);
+ // Return true iff a cached session was associated with the given |cache_key|.
+ bool SSLSessionIsInCache(const std::string& cache_key) const;
+
+ // Informs the cache that it should run a callback when |ssl|'s
+ // session is added to the cache.
+ void SetSessionAddedCallback(SSL* ssl, const base::Closure& callback);
+
+ // Removes the entry for |ssl| from cache's callback map.
+ void RemoveSessionAddedCallback(SSL* ssl);
+
// Indicates that the SSL session associated with |ssl| is "good" - that is,
// that all associated cryptographic parameters that were negotiated,
// including the peer's certificate, were successfully validated. Because

Powered by Google App Engine
This is Rietveld 408576698