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

Unified Diff: chromeos/cert_loader.cc

Issue 405973003: Remove the deprecated NSSCertDatabase::GetInstance() . (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed comment. 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
« no previous file with comments | « chrome/common/net/x509_certificate_model_unittest.cc ('k') | chromeos/cert_loader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/cert_loader.cc
diff --git a/chromeos/cert_loader.cc b/chromeos/cert_loader.cc
index b72d43aa17b0b9bf34248ae273531b4f05e42635..8c22279523ab382dc673fb7d73c0db9175d3416f 100644
--- a/chromeos/cert_loader.cc
+++ b/chromeos/cert_loader.cc
@@ -88,8 +88,7 @@ int CertLoader::TPMTokenSlotID() const {
if (!database_)
return -1;
crypto::ScopedPK11Slot slot(database_->GetPrivateSlot());
- if (!slot)
- return -1;
+ DCHECK(slot);
return static_cast<int>(PK11_GetSlotID(slot.get()));
}
@@ -99,8 +98,7 @@ bool CertLoader::IsHardwareBacked() const {
if (!database_)
return false;
crypto::ScopedPK11Slot slot(database_->GetPrivateSlot());
- if (!slot)
- return false;
+ DCHECK(slot);
return PK11_IsHW(slot.get());
}
« no previous file with comments | « chrome/common/net/x509_certificate_model_unittest.cc ('k') | chromeos/cert_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698