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

Unified Diff: net/cert/test_root_certs_nss.cc

Issue 2732913006: Remove unnecessary iOS ifdefs in NSS files. (Closed)
Patch Set: . Created 3 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/test_root_certs.h ('k') | net/cert/x509_util_nss.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/test_root_certs_nss.cc
diff --git a/net/cert/test_root_certs_nss.cc b/net/cert/test_root_certs_nss.cc
index afa37f13ea2a3c6269739e447fc9b85e656cc726..6f9cc8ad5014621297cd32704eeaf5ff8ef80af4 100644
--- a/net/cert/test_root_certs_nss.cc
+++ b/net/cert/test_root_certs_nss.cc
@@ -12,10 +12,6 @@
#include "crypto/nss_util.h"
#include "net/cert/x509_certificate.h"
-#if defined(OS_IOS)
-#include "net/cert/x509_util_ios.h"
-#endif
-
namespace net {
@@ -30,12 +26,7 @@ TestRootCerts::TrustEntry::~TrustEntry() {
}
bool TestRootCerts::Add(X509Certificate* certificate) {
-#if defined(OS_IOS)
- x509_util_ios::NSSCertificate nss_certificate(certificate->os_cert_handle());
- CERTCertificate* cert_handle = nss_certificate.cert_handle();
-#else
CERTCertificate* cert_handle = certificate->os_cert_handle();
-#endif
// Preserve the original trust bits so that they can be restored when
// the certificate is removed.
CERTCertTrust original_trust;
@@ -92,7 +83,6 @@ bool TestRootCerts::IsEmpty() const {
return trust_cache_.empty();
}
-#if defined(USE_NSS_CERTS)
bool TestRootCerts::Contains(CERTCertificate* cert) const {
for (const auto& item : trust_cache_)
if (X509Certificate::IsSameOSCert(cert, item->certificate()))
@@ -100,7 +90,6 @@ bool TestRootCerts::Contains(CERTCertificate* cert) const {
return false;
}
-#endif
TestRootCerts::~TestRootCerts() {
Clear();
« no previous file with comments | « net/cert/test_root_certs.h ('k') | net/cert/x509_util_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698