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

Unified Diff: net/ssl/ssl_client_auth_cache.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/ssl/ssl_client_auth_cache.h ('k') | net/ssl/ssl_client_auth_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/ssl_client_auth_cache.cc
diff --git a/net/ssl/ssl_client_auth_cache.cc b/net/ssl/ssl_client_auth_cache.cc
deleted file mode 100644
index 4c6b0d82f153a95c6d8d5daf89e88f5a0160f0e9..0000000000000000000000000000000000000000
--- a/net/ssl/ssl_client_auth_cache.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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/ssl/ssl_client_auth_cache.h"
-
-#include "base/logging.h"
-#include "net/cert/x509_certificate.h"
-
-namespace net {
-
-SSLClientAuthCache::SSLClientAuthCache() {
- CertDatabase::GetInstance()->AddObserver(this);
-}
-
-SSLClientAuthCache::~SSLClientAuthCache() {
- CertDatabase::GetInstance()->RemoveObserver(this);
-}
-
-bool SSLClientAuthCache::Lookup(
- const HostPortPair& server,
- scoped_refptr<X509Certificate>* certificate) {
- DCHECK(certificate);
-
- AuthCacheMap::iterator iter = cache_.find(server);
- if (iter == cache_.end())
- return false;
-
- *certificate = iter->second;
- return true;
-}
-
-void SSLClientAuthCache::Add(const HostPortPair& server,
- X509Certificate* value) {
- cache_[server] = value;
-
- // TODO(wtc): enforce a maximum number of entries.
-}
-
-void SSLClientAuthCache::Remove(const HostPortPair& server) {
- cache_.erase(server);
-}
-
-void SSLClientAuthCache::OnCertAdded(const X509Certificate* cert) {
- cache_.clear();
-}
-
-} // namespace net
« no previous file with comments | « net/ssl/ssl_client_auth_cache.h ('k') | net/ssl/ssl_client_auth_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698