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

Unified Diff: net/cert/multi_threaded_cert_verifier.cc

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/mock_cert_verifier.cc ('k') | net/cert/multi_threaded_cert_verifier_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/multi_threaded_cert_verifier.cc
diff --git a/net/cert/multi_threaded_cert_verifier.cc b/net/cert/multi_threaded_cert_verifier.cc
index 432dda059e55aafd18533ea7c161a6308fc17ddf..f89454dad5587e6803ee5b6cdbe801a26abbfdee 100644
--- a/net/cert/multi_threaded_cert_verifier.cc
+++ b/net/cert/multi_threaded_cert_verifier.cc
@@ -204,7 +204,7 @@ class CertVerifierWorker {
// Returns the certificate being verified. May only be called /before/
// Start() is called.
- X509Certificate* certificate() const { return cert_; }
+ X509Certificate* certificate() const { return cert_.get(); }
bool Start() {
DCHECK_EQ(base::MessageLoop::current(), origin_loop_);
@@ -225,8 +225,12 @@ class CertVerifierWorker {
private:
void Run() {
// Runs on a worker thread.
- error_ = verify_proc_->Verify(cert_, hostname_, flags_, crl_set_,
- additional_trust_anchors_, &verify_result_);
+ error_ = verify_proc_->Verify(cert_.get(),
+ hostname_,
+ flags_,
+ crl_set_.get(),
+ additional_trust_anchors_,
+ &verify_result_);
#if defined(USE_NSS) || defined(OS_IOS)
// Detach the thread from NSPR.
// Calling NSS functions attaches the thread to NSPR, which stores
@@ -250,8 +254,11 @@ class CertVerifierWorker {
// memory leaks or worse errors.
base::AutoLock locked(lock_);
if (!canceled_) {
- cert_verifier_->HandleResult(cert_, hostname_, flags_,
- additional_trust_anchors_, error_,
+ cert_verifier_->HandleResult(cert_.get(),
+ hostname_,
+ flags_,
+ additional_trust_anchors_,
+ error_,
verify_result_);
}
}
@@ -448,8 +455,13 @@ int MultiThreadedCertVerifier::Verify(X509Certificate* cert,
} else {
// Need to make a new request.
CertVerifierWorker* worker =
- new CertVerifierWorker(verify_proc_, cert, hostname, flags, crl_set,
- additional_trust_anchors, this);
+ new CertVerifierWorker(verify_proc_.get(),
+ cert,
+ hostname,
+ flags,
+ crl_set,
+ additional_trust_anchors,
+ this);
job = new CertVerifierJob(
worker,
BoundNetLog::Make(net_log.net_log(), NetLog::SOURCE_CERT_VERIFIER_JOB));
« no previous file with comments | « net/cert/mock_cert_verifier.cc ('k') | net/cert/multi_threaded_cert_verifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698