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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // Helper that observes events from the NSSCertDatabase and forwards them to | 44 // Helper that observes events from the NSSCertDatabase and forwards them to |
45 // the given CertDatabase. | 45 // the given CertDatabase. |
46 class CertNotificationForwarder : public NSSCertDatabase::Observer { | 46 class CertNotificationForwarder : public NSSCertDatabase::Observer { |
47 public: | 47 public: |
48 explicit CertNotificationForwarder(CertDatabase* cert_db) | 48 explicit CertNotificationForwarder(CertDatabase* cert_db) |
49 : cert_db_(cert_db) {} | 49 : cert_db_(cert_db) {} |
50 | 50 |
51 virtual ~CertNotificationForwarder() {} | 51 virtual ~CertNotificationForwarder() {} |
52 | 52 |
53 // NSSCertDatabase::Observer implementation: | 53 // NSSCertDatabase::Observer implementation: |
54 virtual void OnCertAdded(const X509Certificate* cert) OVERRIDE { | 54 virtual void OnCertAdded(const X509Certificate* cert) override { |
55 cert_db_->NotifyObserversOfCertAdded(cert); | 55 cert_db_->NotifyObserversOfCertAdded(cert); |
56 } | 56 } |
57 | 57 |
58 virtual void OnCertRemoved(const X509Certificate* cert) OVERRIDE { | 58 virtual void OnCertRemoved(const X509Certificate* cert) override { |
59 cert_db_->NotifyObserversOfCertRemoved(cert); | 59 cert_db_->NotifyObserversOfCertRemoved(cert); |
60 } | 60 } |
61 | 61 |
62 virtual void OnCACertChanged(const X509Certificate* cert) OVERRIDE { | 62 virtual void OnCACertChanged(const X509Certificate* cert) override { |
63 cert_db_->NotifyObserversOfCACertChanged(cert); | 63 cert_db_->NotifyObserversOfCACertChanged(cert); |
64 } | 64 } |
65 | 65 |
66 private: | 66 private: |
67 CertDatabase* cert_db_; | 67 CertDatabase* cert_db_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(CertNotificationForwarder); | 69 DISALLOW_COPY_AND_ASSIGN(CertNotificationForwarder); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace | 72 } // namespace |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 } else { | 470 } else { |
471 if (SEC_DeletePermCertificate(cert->os_cert_handle())) { | 471 if (SEC_DeletePermCertificate(cert->os_cert_handle())) { |
472 LOG(ERROR) << "SEC_DeletePermCertificate failed: " << PORT_GetError(); | 472 LOG(ERROR) << "SEC_DeletePermCertificate failed: " << PORT_GetError(); |
473 return false; | 473 return false; |
474 } | 474 } |
475 } | 475 } |
476 return true; | 476 return true; |
477 } | 477 } |
478 | 478 |
479 } // namespace net | 479 } // namespace net |
OLD | NEW |