Remove lock in AtomCertVerifier
This commit is contained in:
parent
24c60019b7
commit
e5ccb3fd5d
2 changed files with 3 additions and 12 deletions
|
@ -36,7 +36,6 @@ AtomCertVerifier::~AtomCertVerifier() {
|
|||
}
|
||||
|
||||
void AtomCertVerifier::SetVerifyProc(const VerifyProc& proc) {
|
||||
base::AutoLock auto_lock(lock_);
|
||||
verify_proc_ = proc;
|
||||
}
|
||||
|
||||
|
@ -52,20 +51,14 @@ int AtomCertVerifier::Verify(
|
|||
const net::BoundNetLog& net_log) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
|
||||
VerifyProc proc;
|
||||
{
|
||||
base::AutoLock auto_lock(lock_);
|
||||
proc = verify_proc_;
|
||||
}
|
||||
|
||||
if (proc.is_null())
|
||||
if (verify_proc_.is_null())
|
||||
return default_cert_verifier_->Verify(
|
||||
cert, hostname, ocsp_response, flags, crl_set, verify_result, callback,
|
||||
out_req, net_log);
|
||||
|
||||
BrowserThread::PostTask(
|
||||
BrowserThread::UI, FROM_HERE,
|
||||
base::Bind(proc, hostname, make_scoped_refptr(cert),
|
||||
base::Bind(verify_proc_, hostname, make_scoped_refptr(cert),
|
||||
base::Bind(OnResult, verify_result, callback)));
|
||||
return net::ERR_IO_PENDING;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
#ifndef ATOM_BROWSER_NET_ATOM_CERT_VERIFIER_H_
|
||||
#define ATOM_BROWSER_NET_ATOM_CERT_VERIFIER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "net/cert/cert_verifier.h"
|
||||
|
||||
namespace atom {
|
||||
|
@ -39,7 +38,6 @@ class AtomCertVerifier : public net::CertVerifier {
|
|||
bool SupportsOCSPStapling() override;
|
||||
|
||||
private:
|
||||
base::Lock lock_;
|
||||
VerifyProc verify_proc_;
|
||||
std::unique_ptr<net::CertVerifier> default_cert_verifier_;
|
||||
|
||||
|
|
Loading…
Reference in a new issue