| OLD | NEW |
| 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/multi_threaded_cert_verifier.h" | 5 #include "net/base/multi_threaded_cert_verifier.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 return ERR_IO_PENDING; | 454 return ERR_IO_PENDING; |
| 455 } | 455 } |
| 456 | 456 |
| 457 void MultiThreadedCertVerifier::CancelRequest(RequestHandle req) { | 457 void MultiThreadedCertVerifier::CancelRequest(RequestHandle req) { |
| 458 DCHECK(CalledOnValidThread()); | 458 DCHECK(CalledOnValidThread()); |
| 459 CertVerifierRequest* request = reinterpret_cast<CertVerifierRequest*>(req); | 459 CertVerifierRequest* request = reinterpret_cast<CertVerifierRequest*>(req); |
| 460 request->Cancel(); | 460 request->Cancel(); |
| 461 } | 461 } |
| 462 | 462 |
| 463 MultiThreadedCertVerifier::RequestParams::RequestParams( | 463 MultiThreadedCertVerifier::RequestParams::RequestParams( |
| 464 const SHA1Fingerprint& cert_fingerprint_arg, | 464 const SHA1HashValue& cert_fingerprint_arg, |
| 465 const SHA1Fingerprint& ca_fingerprint_arg, | 465 const SHA1HashValue& ca_fingerprint_arg, |
| 466 const std::string& hostname_arg, | 466 const std::string& hostname_arg, |
| 467 int flags_arg) | 467 int flags_arg) |
| 468 : cert_fingerprint(cert_fingerprint_arg), | 468 : cert_fingerprint(cert_fingerprint_arg), |
| 469 ca_fingerprint(ca_fingerprint_arg), | 469 ca_fingerprint(ca_fingerprint_arg), |
| 470 hostname(hostname_arg), | 470 hostname(hostname_arg), |
| 471 flags(flags_arg) {} | 471 flags(flags_arg) {} |
| 472 | 472 |
| 473 // HandleResult is called by CertVerifierWorker on the origin message loop. | 473 // HandleResult is called by CertVerifierWorker on the origin message loop. |
| 474 // It deletes CertVerifierJob. | 474 // It deletes CertVerifierJob. |
| 475 void MultiThreadedCertVerifier::HandleResult( | 475 void MultiThreadedCertVerifier::HandleResult( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 DCHECK(CalledOnValidThread()); | 509 DCHECK(CalledOnValidThread()); |
| 510 | 510 |
| 511 ClearCache(); | 511 ClearCache(); |
| 512 } | 512 } |
| 513 | 513 |
| 514 void MultiThreadedCertVerifier::SetCertVerifyProc(CertVerifyProc* verify_proc) { | 514 void MultiThreadedCertVerifier::SetCertVerifyProc(CertVerifyProc* verify_proc) { |
| 515 verify_proc_ = verify_proc; | 515 verify_proc_ = verify_proc; |
| 516 } | 516 } |
| 517 | 517 |
| 518 } // namespace net | 518 } // namespace net |
| OLD | NEW |