| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cert_database.h" | 5 #include "net/cert/cert_database.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/observer_list_threadsafe.h" | 9 #include "base/observer_list_threadsafe.h" |
| 10 #include "crypto/wincrypt_shim.h" | 10 #include "crypto/wincrypt_shim.h" |
| 11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 12 #include "net/cert/x509_certificate.h" | 12 #include "net/cert/x509_certificate.h" |
| 13 | 13 |
| 14 #pragma comment(lib, "crypt32.lib") | |
| 15 | |
| 16 namespace net { | 14 namespace net { |
| 17 | 15 |
| 18 CertDatabase::CertDatabase() | 16 CertDatabase::CertDatabase() |
| 19 : observer_list_(new base::ObserverListThreadSafe<Observer>) { | 17 : observer_list_(new base::ObserverListThreadSafe<Observer>) { |
| 20 } | 18 } |
| 21 | 19 |
| 22 CertDatabase::~CertDatabase() {} | 20 CertDatabase::~CertDatabase() {} |
| 23 | 21 |
| 24 int CertDatabase::CheckUserCert(X509Certificate* cert) { | 22 int CertDatabase::CheckUserCert(X509Certificate* cert) { |
| 25 if (!cert) | 23 if (!cert) |
| (...skipping 27 matching lines...) Expand all Loading... |
| 53 CertCloseStore(cert_db, 0); | 51 CertCloseStore(cert_db, 0); |
| 54 | 52 |
| 55 if (!added) | 53 if (!added) |
| 56 return ERR_ADD_USER_CERT_FAILED; | 54 return ERR_ADD_USER_CERT_FAILED; |
| 57 | 55 |
| 58 NotifyObserversOfCertAdded(cert); | 56 NotifyObserversOfCertAdded(cert); |
| 59 return OK; | 57 return OK; |
| 60 } | 58 } |
| 61 | 59 |
| 62 } // namespace net | 60 } // namespace net |
| OLD | NEW |