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

Unified Diff: crypto/scoped_test_system_nss_key_slot.cc

Issue 424523002: Enable system NSS key slot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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: crypto/scoped_test_system_nss_key_slot.cc
diff --git a/crypto/scoped_test_system_nss_key_slot.cc b/crypto/scoped_test_system_nss_key_slot.cc
index ee5e1dfaa274d0c756bc13a20450d6670cc57f03..169443d3359deec834c7b3007a5ce9acb8b45f97 100644
--- a/crypto/scoped_test_system_nss_key_slot.cc
+++ b/crypto/scoped_test_system_nss_key_slot.cc
@@ -9,20 +9,26 @@
namespace crypto {
-ScopedTestSystemNSSKeySlot::ScopedTestSystemNSSKeySlot()
+ScopedTestSystemNSSKeySlot::ScopedTestSystemNSSKeySlot(
+ bool skip_tpm_initialization)
: test_db_(new ScopedTestNSSDB) {
if (!test_db_->is_open())
return;
SetSystemKeySlotForTesting(
+ skip_tpm_initialization,
ScopedPK11Slot(PK11_ReferenceSlot(test_db_->slot())));
}
ScopedTestSystemNSSKeySlot::~ScopedTestSystemNSSKeySlot() {
- SetSystemKeySlotForTesting(ScopedPK11Slot());
+ SetSystemKeySlotForTesting(false, ScopedPK11Slot());
}
bool ScopedTestSystemNSSKeySlot::ConstructedSuccessfully() const {
return test_db_->is_open();
}
+PK11SlotInfo* ScopedTestSystemNSSKeySlot::slot() const {
+ return test_db_->slot();
+}
+
} // namespace crypto

Powered by Google App Engine
This is Rietveld 408576698