OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/cert/nss_cert_database.h" | 5 #include "net/cert/nss_cert_database.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <certdb.h> | 8 #include <certdb.h> |
9 #include <keyhi.h> | 9 #include <keyhi.h> |
10 #include <pk11pub.h> | 10 #include <pk11pub.h> |
(...skipping 17 matching lines...) Expand all Loading... |
28 #if !defined(CERTDB_TERMINAL_RECORD) | 28 #if !defined(CERTDB_TERMINAL_RECORD) |
29 #define CERTDB_TERMINAL_RECORD CERTDB_VALID_PEER | 29 #define CERTDB_TERMINAL_RECORD CERTDB_VALID_PEER |
30 #endif | 30 #endif |
31 | 31 |
32 // PSM = Mozilla's Personal Security Manager. | 32 // PSM = Mozilla's Personal Security Manager. |
33 namespace psm = mozilla_security_manager; | 33 namespace psm = mozilla_security_manager; |
34 | 34 |
35 namespace net { | 35 namespace net { |
36 | 36 |
37 NSSCertDatabase::ImportCertFailure::ImportCertFailure( | 37 NSSCertDatabase::ImportCertFailure::ImportCertFailure( |
38 X509Certificate* cert, int err) | 38 const scoped_refptr<X509Certificate>& cert, |
39 : certificate(cert), | 39 int err) |
40 net_error(err) {} | 40 : certificate(cert), net_error(err) {} |
41 | 41 |
42 NSSCertDatabase::ImportCertFailure::~ImportCertFailure() {} | 42 NSSCertDatabase::ImportCertFailure::~ImportCertFailure() {} |
43 | 43 |
44 // static | 44 // static |
45 NSSCertDatabase* NSSCertDatabase::GetInstance() { | 45 NSSCertDatabase* NSSCertDatabase::GetInstance() { |
46 return Singleton<NSSCertDatabase, | 46 return Singleton<NSSCertDatabase, |
47 LeakySingletonTraits<NSSCertDatabase> >::get(); | 47 LeakySingletonTraits<NSSCertDatabase> >::get(); |
48 } | 48 } |
49 | 49 |
50 NSSCertDatabase::NSSCertDatabase() | 50 NSSCertDatabase::NSSCertDatabase() |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 observer_list_->Notify(&Observer::OnCertRemoved, make_scoped_refptr(cert)); | 336 observer_list_->Notify(&Observer::OnCertRemoved, make_scoped_refptr(cert)); |
337 } | 337 } |
338 | 338 |
339 void NSSCertDatabase::NotifyObserversOfCertTrustChanged( | 339 void NSSCertDatabase::NotifyObserversOfCertTrustChanged( |
340 const X509Certificate* cert) { | 340 const X509Certificate* cert) { |
341 observer_list_->Notify( | 341 observer_list_->Notify( |
342 &Observer::OnCertTrustChanged, make_scoped_refptr(cert)); | 342 &Observer::OnCertTrustChanged, make_scoped_refptr(cert)); |
343 } | 343 } |
344 | 344 |
345 } // namespace net | 345 } // namespace net |
OLD | NEW |