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

Unified Diff: net/socket/ssl_session_cache_openssl.cc

Issue 328903004: SSL Connect Job Waiting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add separate state for ProcessPendingJobs Created 6 years, 6 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.cc
diff --git a/net/socket/ssl_session_cache_openssl.cc b/net/socket/ssl_session_cache_openssl.cc
index d16bb8d6325ec6b105da7219d4e9ea9e5f6f4828..ae3c5a4a2cdbdd43c5064d107685a661ba44085b 100644
--- a/net/socket/ssl_session_cache_openssl.cc
+++ b/net/socket/ssl_session_cache_openssl.cc
@@ -236,6 +236,14 @@ class SSLSessionCacheOpenSSLImpl {
return SSL_set_session(ssl, session) == 1;
}
+ bool SSLSessionIsInCache(const std::string& cache_key) const {
+ base::AutoLock locked(lock_);
+ KeyIndex::const_iterator it = key_index_.find(cache_key);
+ if (it == key_index_.end())
+ return false;
+ return true;
+ }
+
void MarkSSLSessionAsGood(SSL* ssl) {
SSL_SESSION* session = SSL_get_session(ssl);
if (!session)
@@ -469,7 +477,7 @@ class SSLSessionCacheOpenSSLImpl {
// method to get the index which can later be used with SSL_CTX_get_ex_data()
// or SSL_CTX_set_ex_data().
- base::Lock lock_; // Protects access to containers below.
+ mutable base::Lock lock_; // Protects access to containers below.
MRUSessionList ordering_;
KeyIndex key_index_;
@@ -499,6 +507,11 @@ bool SSLSessionCacheOpenSSL::SetSSLSessionWithKey(
return impl_->SetSSLSessionWithKey(ssl, cache_key);
}
+bool SSLSessionCacheOpenSSL::SSLSessionIsInCache(
+ const std::string& cache_key) const {
+ return impl_->SSLSessionIsInCache(cache_key);
+}
+
void SSLSessionCacheOpenSSL::MarkSSLSessionAsGood(SSL* ssl) {
return impl_->MarkSSLSessionAsGood(ssl);
}
« net/socket/ssl_client_socket_pool.cc ('K') | « net/socket/ssl_session_cache_openssl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698