OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/quic/crypto/proof_verifier_chromium.h" | 5 #include "net/quic/crypto/proof_verifier_chromium.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 13 matching lines...) Expand all Loading... | |
24 #include "net/quic/crypto/crypto_protocol.h" | 24 #include "net/quic/crypto/crypto_protocol.h" |
25 #include "net/ssl/ssl_config_service.h" | 25 #include "net/ssl/ssl_config_service.h" |
26 | 26 |
27 using base::StringPiece; | 27 using base::StringPiece; |
28 using base::StringPrintf; | 28 using base::StringPrintf; |
29 using std::string; | 29 using std::string; |
30 using std::vector; | 30 using std::vector; |
31 | 31 |
32 namespace net { | 32 namespace net { |
33 | 33 |
34 ProofVerifyDetails* ProofVerifyDetailsChromium::Clone() const { | |
35 ProofVerifyDetailsChromium* other = new ProofVerifyDetailsChromium; | |
36 other->cert_verify_result.CopyFrom(cert_verify_result); | |
wtc
2014/07/29 01:48:24
I wonder why we don't just do
other->cert_verif
Ryan Hamilton
2014/07/29 17:04:50
Done. I wonder why it has a CopyFrom method?
| |
37 return NULL; | |
wtc
2014/07/29 01:48:24
BUG: return other;
You owe me a lunch :-)
Ryan Hamilton
2014/07/29 17:04:50
Done. (I had not yet verified the fix :>)
| |
38 } | |
39 | |
34 // A Job handles the verification of a single proof. It is owned by the | 40 // A Job handles the verification of a single proof. It is owned by the |
35 // ProofVerifier. If the verification can not complete synchronously, it | 41 // ProofVerifier. If the verification can not complete synchronously, it |
36 // will notify the ProofVerifier upon completion. | 42 // will notify the ProofVerifier upon completion. |
37 class ProofVerifierChromium::Job { | 43 class ProofVerifierChromium::Job { |
38 public: | 44 public: |
39 Job(ProofVerifierChromium* proof_verifier, | 45 Job(ProofVerifierChromium* proof_verifier, |
40 CertVerifier* cert_verifier, | 46 CertVerifier* cert_verifier, |
41 const BoundNetLog& net_log); | 47 const BoundNetLog& net_log); |
42 | 48 |
43 // Starts the proof verification. If |QUIC_PENDING| is returned, then | 49 // Starts the proof verification. If |QUIC_PENDING| is returned, then |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 } | 346 } |
341 return status; | 347 return status; |
342 } | 348 } |
343 | 349 |
344 void ProofVerifierChromium::OnJobComplete(Job* job) { | 350 void ProofVerifierChromium::OnJobComplete(Job* job) { |
345 active_jobs_.erase(job); | 351 active_jobs_.erase(job); |
346 delete job; | 352 delete job; |
347 } | 353 } |
348 | 354 |
349 } // namespace net | 355 } // namespace net |
OLD | NEW |