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

Unified Diff: net/cert/nss_profile_filter_chromeos.h

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/cert/nss_cert_database_unittest.cc ('k') | net/cert/nss_profile_filter_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
deleted file mode 100644
index 36c42d007edf98cfe09c66ed9c494e10e900a137..0000000000000000000000000000000000000000
--- a/net/cert/nss_profile_filter_chromeos.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2013 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.
-
-#ifndef NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_
-#define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "crypto/scoped_nss_types.h"
-#include "net/base/crypto_module.h"
-#include "net/base/net_export.h"
-
-namespace net {
-
-class X509Certificate;
-
-// On ChromeOS each user has separate NSS databases, which are loaded
-// simultaneously when multiple users are logged in at the same time. NSS
-// doesn't have built-in support to partition databases into separate groups, so
-// NSSProfileFilterChromeOS can be used to check if a given slot or certificate
-// should be used for a given user.
-//
-// Objects of this class are thread-safe except for the Init function, which if
-// called must not be called while other threads could access the object.
-class NET_EXPORT NSSProfileFilterChromeOS {
- public:
- // Create a filter. Until Init is called (or if Init is called with NULL
- // slot handles), the filter will allow only certs/slots from the read-only
- // slots and the root CA module.
- NSSProfileFilterChromeOS();
- NSSProfileFilterChromeOS(const NSSProfileFilterChromeOS& other);
- ~NSSProfileFilterChromeOS();
-
- NSSProfileFilterChromeOS& operator=(const NSSProfileFilterChromeOS& other);
-
- // Initialize the filter with the slot handles to allow. This method is not
- // thread-safe.
- void Init(crypto::ScopedPK11Slot public_slot,
- crypto::ScopedPK11Slot private_slot,
- crypto::ScopedPK11Slot system_slot);
-
- bool IsModuleAllowed(PK11SlotInfo* slot) const;
- bool IsCertAllowed(CERTCertificate* 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;
-
- private:
- const NSSProfileFilterChromeOS& filter_;
- };
-
- private:
- crypto::ScopedPK11Slot public_slot_;
- crypto::ScopedPK11Slot private_slot_;
- crypto::ScopedPK11Slot system_slot_;
-};
-
-} // namespace net
-
-#endif // NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_
« no previous file with comments | « net/cert/nss_cert_database_unittest.cc ('k') | net/cert/nss_profile_filter_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698