Create a new CertVerifierRequest for each request

It greatly simplifies the code.
This commit is contained in:
Cheng Zhao 2015-11-17 19:44:55 +08:00
parent ea1e4160ea
commit e3517b701e
3 changed files with 48 additions and 189 deletions

View file

@ -267,7 +267,7 @@ void Session::RequestCertVerification(
bool prevent_default = Emit(
"verify-certificate",
request->hostname(),
request->certificate(),
make_scoped_refptr(request->cert()),
base::Bind(&PassVerificationResult, request));
if (!prevent_default)
@ -294,6 +294,7 @@ bool Session::IsDestroyed() const {
}
void Session::Destroy() {
browser_context_->cert_verifier()->SetDelegate(nullptr);
browser_context_ = nullptr;
}