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

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

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/nss_cert_database.h ('k') | net/cert/test_root_certs_unittest.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/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
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
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
OLDNEW
« no previous file with comments | « net/cert/nss_cert_database.h ('k') | net/cert/test_root_certs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698