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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 // A Job handles the verification of a single proof. It is owned by the | 34 // A Job handles the verification of a single proof. It is owned by the |
35 // ProofVerifier. If the verification can not complete synchronously, it | 35 // ProofVerifier. If the verification can not complete synchronously, it |
36 // will notify the ProofVerifier upon completion. | 36 // will notify the ProofVerifier upon completion. |
37 class ProofVerifierChromium::Job { | 37 class ProofVerifierChromium::Job { |
38 public: | 38 public: |
39 Job(ProofVerifierChromium* proof_verifier, | 39 Job(ProofVerifierChromium* proof_verifier, |
40 CertVerifier* cert_verifier, | 40 CertVerifier* cert_verifier, |
41 const BoundNetLog& net_log); | 41 const BoundNetLog& net_log); |
42 | 42 |
43 // Starts the proof verification. If |PENDING| is returned, then |callback| | 43 // Starts the proof verification. If |QUIC_PENDING| is returned, then |
44 // will be invoked asynchronously when the verification completes. | 44 // |callback| will be invoked asynchronously when the verification completes. |
45 QuicAsyncStatus VerifyProof(const std::string& hostname, | 45 QuicAsyncStatus VerifyProof(const std::string& hostname, |
46 const std::string& server_config, | 46 const std::string& server_config, |
47 const std::vector<std::string>& certs, | 47 const std::vector<std::string>& certs, |
48 const std::string& signature, | 48 const std::string& signature, |
49 std::string* error_details, | 49 std::string* error_details, |
50 scoped_ptr<ProofVerifyDetails>* verify_details, | 50 scoped_ptr<ProofVerifyDetails>* verify_details, |
51 ProofVerifierCallback* callback); | 51 ProofVerifierCallback* callback); |
52 | 52 |
53 private: | 53 private: |
54 enum State { | 54 enum State { |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 341 } |
342 return status; | 342 return status; |
343 } | 343 } |
344 | 344 |
345 void ProofVerifierChromium::OnJobComplete(Job* job) { | 345 void ProofVerifierChromium::OnJobComplete(Job* job) { |
346 active_jobs_.erase(job); | 346 active_jobs_.erase(job); |
347 delete job; | 347 delete job; |
348 } | 348 } |
349 | 349 |
350 } // namespace net | 350 } // namespace net |
OLD | NEW |