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

Side by Side Diff: net/cert/cert_database_nss.cc

Issue 13006020: net: extract net/cert out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/cert/cert_database_mac.cc ('k') | net/cert/cert_database_openssl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/base/cert_database.h" 5 #include "net/cert/cert_database.h"
6 6
7 #include <cert.h> 7 #include <cert.h>
8 #include <pk11pub.h> 8 #include <pk11pub.h>
9 #include <secmod.h> 9 #include <secmod.h>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/observer_list_threadsafe.h" 12 #include "base/observer_list_threadsafe.h"
13 #include "crypto/nss_util.h" 13 #include "crypto/nss_util.h"
14 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
15 #include "net/base/nss_cert_database.h" 15 #include "net/cert/nss_cert_database.h"
16 #include "net/base/x509_certificate.h" 16 #include "net/cert/x509_certificate.h"
17 17
18 namespace net { 18 namespace net {
19 19
20 // Helper that observes events from the NSSCertDatabase and forwards them to 20 // Helper that observes events from the NSSCertDatabase and forwards them to
21 // the given CertDatabase. 21 // the given CertDatabase.
22 class CertDatabase::Notifier : public NSSCertDatabase::Observer { 22 class CertDatabase::Notifier : public NSSCertDatabase::Observer {
23 public: 23 public:
24 explicit Notifier(CertDatabase* cert_db) : cert_db_(cert_db) { 24 explicit Notifier(CertDatabase* cert_db) : cert_db_(cert_db) {
25 NSSCertDatabase::GetInstance()->AddObserver(this); 25 NSSCertDatabase::GetInstance()->AddObserver(this);
26 } 26 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (!slot) { 95 if (!slot) {
96 LOG(ERROR) << "Couldn't import user certificate."; 96 LOG(ERROR) << "Couldn't import user certificate.";
97 return ERR_ADD_USER_CERT_FAILED; 97 return ERR_ADD_USER_CERT_FAILED;
98 } 98 }
99 PK11_FreeSlot(slot); 99 PK11_FreeSlot(slot);
100 NotifyObserversOfCertAdded(cert_obj); 100 NotifyObserversOfCertAdded(cert_obj);
101 return OK; 101 return OK;
102 } 102 }
103 103
104 } // namespace net 104 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/cert_database_mac.cc ('k') | net/cert/cert_database_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698