| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ | 5 #ifndef NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ |
| 6 #define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ | 6 #define NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" |
| 10 #include "crypto/scoped_nss_types.h" | 11 #include "crypto/scoped_nss_types.h" |
| 11 #include "net/base/crypto_module.h" | |
| 12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 class X509Certificate; | 16 class X509Certificate; |
| 17 | 17 |
| 18 // On ChromeOS each user has separate NSS databases, which are loaded | 18 // On ChromeOS each user has separate NSS databases, which are loaded |
| 19 // simultaneously when multiple users are logged in at the same time. NSS | 19 // simultaneously when multiple users are logged in at the same time. NSS |
| 20 // doesn't have built-in support to partition databases into separate groups, so | 20 // doesn't have built-in support to partition databases into separate groups, so |
| 21 // NSSProfileFilterChromeOS can be used to check if a given slot or certificate | 21 // NSSProfileFilterChromeOS can be used to check if a given slot or certificate |
| (...skipping 28 matching lines...) Expand all Loading... |
| 50 bool operator()(const scoped_refptr<X509Certificate>& cert) const; | 50 bool operator()(const scoped_refptr<X509Certificate>& cert) const; |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 const NSSProfileFilterChromeOS& filter_; | 53 const NSSProfileFilterChromeOS& filter_; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 class ModuleNotAllowedForProfilePredicate { | 56 class ModuleNotAllowedForProfilePredicate { |
| 57 public: | 57 public: |
| 58 explicit ModuleNotAllowedForProfilePredicate( | 58 explicit ModuleNotAllowedForProfilePredicate( |
| 59 const NSSProfileFilterChromeOS& filter); | 59 const NSSProfileFilterChromeOS& filter); |
| 60 bool operator()(const scoped_refptr<CryptoModule>& module) const; | 60 bool operator()(const crypto::ScopedPK11Slot& module) const; |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 const NSSProfileFilterChromeOS& filter_; | 63 const NSSProfileFilterChromeOS& filter_; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 crypto::ScopedPK11Slot public_slot_; | 67 crypto::ScopedPK11Slot public_slot_; |
| 68 crypto::ScopedPK11Slot private_slot_; | 68 crypto::ScopedPK11Slot private_slot_; |
| 69 crypto::ScopedPK11Slot system_slot_; | 69 crypto::ScopedPK11Slot system_slot_; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace net | 72 } // namespace net |
| 73 | 73 |
| 74 #endif // NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ | 74 #endif // NET_CERT_NSS_PROFILE_FILTER_CHROMEOS_H_ |
| OLD | NEW |