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

Unified Diff: net/base/tls_client_login_cache.cc

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove "httpsv" scheme, minor NSS/OpenSSL changes Created 9 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
« no previous file with comments | « net/base/tls_client_login_cache.h ('k') | net/base/tls_client_login_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/tls_client_login_cache.cc
diff --git a/net/base/tls_client_login_cache.cc b/net/base/tls_client_login_cache.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2412fb3c20ff6dfac590e8a99d4e3234ce700f7e
--- /dev/null
+++ b/net/base/tls_client_login_cache.cc
@@ -0,0 +1,39 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/base/tls_client_login_cache.h"
+
+#include "base/logging.h"
+
+namespace net {
+
+TLSClientLoginCache::TLSClientLoginCache() {}
+
+TLSClientLoginCache::~TLSClientLoginCache() {}
+
+bool TLSClientLoginCache::Lookup(
+ const std::string& server,
+ scoped_refptr<AuthData>* tls_auth_data) {
+ DCHECK(tls_auth_data);
+
+ AuthCacheMap::iterator iter = cache_.find(server);
+ if (iter == cache_.end())
+ return false;
+
+ *tls_auth_data = iter->second;
+ return true;
+}
+
+void TLSClientLoginCache::Add(const std::string& server,
+ AuthData* tls_auth_data) {
+ cache_[server] = tls_auth_data;
+
+ // TODO(wtc): enforce a maximum number of entries.
+}
+
+void TLSClientLoginCache::Remove(const std::string& server) {
+ cache_.erase(server);
+}
+
+} // namespace net
« no previous file with comments | « net/base/tls_client_login_cache.h ('k') | net/base/tls_client_login_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698