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

Unified Diff: net/ssl/ssl_client_session_cache_impl.cc

Issue 1921563003: Renaming _openssl files to _impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/ssl/ssl_client_session_cache_impl.cc
diff --git a/net/ssl/ssl_client_session_cache_openssl.cc b/net/ssl/ssl_client_session_cache_impl.cc
similarity index 66%
rename from net/ssl/ssl_client_session_cache_openssl.cc
rename to net/ssl/ssl_client_session_cache_impl.cc
index d4812694c1b5ca0c5993c1099fc884b1cafb550d..5aaaa7d884a3d1b2123ead96fad3baeb27058ccb 100644
--- a/net/ssl/ssl_client_session_cache_openssl.cc
+++ b/net/ssl/ssl_client_session_cache_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/ssl/ssl_client_session_cache_openssl.h"
+#include "net/ssl/ssl_client_session_cache_impl.h"
#include <utility>
@@ -11,22 +11,21 @@
namespace net {
-SSLClientSessionCacheOpenSSL::SSLClientSessionCacheOpenSSL(const Config& config)
+SSLClientSessionCacheImpl::SSLClientSessionCacheImpl(const Config& config)
: clock_(new base::DefaultClock),
config_(config),
cache_(config.max_entries),
- lookups_since_flush_(0) {
-}
+ lookups_since_flush_(0) {}
-SSLClientSessionCacheOpenSSL::~SSLClientSessionCacheOpenSSL() {
+SSLClientSessionCacheImpl::~SSLClientSessionCacheImpl() {
Flush();
}
-size_t SSLClientSessionCacheOpenSSL::size() const {
+size_t SSLClientSessionCacheImpl::size() const {
return cache_.size();
}
-ScopedSSL_SESSION SSLClientSessionCacheOpenSSL::Lookup(
+ScopedSSL_SESSION SSLClientSessionCacheImpl::Lookup(
const std::string& cache_key) {
base::AutoLock lock(lock_);
@@ -47,8 +46,8 @@ ScopedSSL_SESSION SSLClientSessionCacheOpenSSL::Lookup(
return ScopedSSL_SESSION(SSL_SESSION_up_ref(iter->second->session.get()));
}
-void SSLClientSessionCacheOpenSSL::Insert(const std::string& cache_key,
- SSL_SESSION* session) {
+void SSLClientSessionCacheImpl::Insert(const std::string& cache_key,
+ SSL_SESSION* session) {
base::AutoLock lock(lock_);
// Make a new entry.
@@ -60,31 +59,29 @@ void SSLClientSessionCacheOpenSSL::Insert(const std::string& cache_key,
cache_.Put(cache_key, std::move(entry));
}
-void SSLClientSessionCacheOpenSSL::Flush() {
+void SSLClientSessionCacheImpl::Flush() {
base::AutoLock lock(lock_);
cache_.Clear();
}
-void SSLClientSessionCacheOpenSSL::SetClockForTesting(
+void SSLClientSessionCacheImpl::SetClockForTesting(
std::unique_ptr<base::Clock> clock) {
clock_ = std::move(clock);
}
-SSLClientSessionCacheOpenSSL::CacheEntry::CacheEntry() {
-}
+SSLClientSessionCacheImpl::CacheEntry::CacheEntry() {}
-SSLClientSessionCacheOpenSSL::CacheEntry::~CacheEntry() {
-}
+SSLClientSessionCacheImpl::CacheEntry::~CacheEntry() {}
-bool SSLClientSessionCacheOpenSSL::IsExpired(
- SSLClientSessionCacheOpenSSL::CacheEntry* entry,
+bool SSLClientSessionCacheImpl::IsExpired(
+ SSLClientSessionCacheImpl::CacheEntry* entry,
const base::Time& now) {
return now < entry->creation_time ||
entry->creation_time + config_.timeout < now;
}
-void SSLClientSessionCacheOpenSSL::FlushExpiredSessions() {
+void SSLClientSessionCacheImpl::FlushExpiredSessions() {
base::Time now = clock_->Now();
CacheEntryMap::iterator iter = cache_.begin();
while (iter != cache_.end()) {

Powered by Google App Engine
This is Rietveld 408576698