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

Unified Diff: net/cert/nss_profile_filter_chromeos.h

Issue 144423007: Make NSSCertDatabase::ListCerts work async on a worker thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aa Created 6 years, 11 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/cert/nss_profile_filter_chromeos.h
diff --git a/net/cert/nss_profile_filter_chromeos.h b/net/cert/nss_profile_filter_chromeos.h
index d5ff8186888495c78bf8831a1dd0e1ab4eab194f..639d6eaff5b5c597bd92c2f691383c8bf4a9008b 100644
--- a/net/cert/nss_profile_filter_chromeos.h
+++ b/net/cert/nss_profile_filter_chromeos.h
@@ -2,53 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_CERT_NSS_PROFILE_FILTER_CHROMEOS
-#define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS
+#ifndef NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_
+#define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_
-#include "base/callback_forward.h"
+#include "base/memory/ref_counted.h"
#include "crypto/scoped_nss_types.h"
-#include "net/base/crypto_module.h"
-#include "net/cert/x509_certificate.h"
-
-namespace content {
-class ResourceContext;
-} // namespace content
+#include "net/base/net_export.h"
+#include "net/cert/nss_database_filter.h"
namespace net {
-class NET_EXPORT NSSProfileFilterChromeOS {
+class NET_EXPORT NSSProfileFilterChromeOS : public NSSDatabaseFilter {
public:
NSSProfileFilterChromeOS();
- ~NSSProfileFilterChromeOS();
- // Initialize with slot handles.
void Init(crypto::ScopedPK11Slot public_slot,
crypto::ScopedPK11Slot private_slot);
- bool IsModuleAllowed(PK11SlotInfo* slot) const;
- bool IsCertAllowed(const scoped_refptr<X509Certificate>& cert) const;
-
- class CertNotAllowedForProfilePredicate {
- public:
- explicit CertNotAllowedForProfilePredicate(
- const NSSProfileFilterChromeOS& filter);
- bool operator()(const scoped_refptr<X509Certificate>& cert) const;
-
- private:
- const NSSProfileFilterChromeOS& filter_;
- };
-
- class ModuleNotAllowedForProfilePredicate {
- public:
- explicit ModuleNotAllowedForProfilePredicate(
- const NSSProfileFilterChromeOS& filter);
- bool operator()(const scoped_refptr<CryptoModule>& module) const;
+ virtual bool IsModuleAllowed(PK11SlotInfo* slot) const OVERRIDE;
+ virtual bool IsCertAllowed(
+ const scoped_refptr<X509Certificate>& cert) const OVERRIDE;
- private:
- const NSSProfileFilterChromeOS& filter_;
- };
+ protected:
+ virtual ~NSSProfileFilterChromeOS();
- private:
crypto::ScopedPK11Slot public_slot_;
crypto::ScopedPK11Slot private_slot_;
@@ -57,4 +34,4 @@ class NET_EXPORT NSSProfileFilterChromeOS {
} // namespace net
-#endif // NET_CERT_NSS_PROFILE_FILTER_CHROMEOS
+#endif // NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698