Remove PlatformFile from profile_browsertest
[chromium-blink-merge.git] / net / quic / crypto / proof_verifier_chromium.h
blobebf9a2c41c4c2fc6ad6a132a413dacb51ef44256
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
3 // found in the LICENSE file.
5 #ifndef NET_QUIC_CRYPTO_PROOF_VERIFIER_CHROMIUM_H_
6 #define NET_QUIC_CRYPTO_PROOF_VERIFIER_CHROMIUM_H_
8 #include <set>
9 #include <string>
10 #include <vector>
12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "net/base/net_export.h"
16 #include "net/base/net_log.h"
17 #include "net/cert/cert_verify_result.h"
18 #include "net/cert/x509_certificate.h"
19 #include "net/quic/crypto/proof_verifier.h"
21 namespace net {
23 class CertVerifier;
24 class SingleRequestCertVerifier;
26 // ProofVerifyDetailsChromium is the implementation-specific information that a
27 // ProofVerifierChromium returns about a certificate verification.
28 struct ProofVerifyDetailsChromium : public ProofVerifyDetails {
29 public:
30 CertVerifyResult cert_verify_result;
33 // ProofVerifyContextChromium is the implementation-specific information that a
34 // ProofVerifierChromium needs in order to log correctly.
35 struct ProofVerifyContextChromium : public ProofVerifyContext {
36 public:
37 explicit ProofVerifyContextChromium(const BoundNetLog& net_log)
38 : net_log(net_log) {}
40 BoundNetLog net_log;
43 // ProofVerifierChromium implements the QUIC ProofVerifier interface. It is
44 // capable of handling multiple simultaneous requests.
45 class NET_EXPORT_PRIVATE ProofVerifierChromium : public ProofVerifier {
46 public:
47 explicit ProofVerifierChromium(CertVerifier* cert_verifier);
48 virtual ~ProofVerifierChromium();
50 // ProofVerifier interface
51 virtual Status VerifyProof(const std::string& hostname,
52 const std::string& server_config,
53 const std::vector<std::string>& certs,
54 const std::string& signature,
55 const ProofVerifyContext* verify_context,
56 std::string* error_details,
57 scoped_ptr<ProofVerifyDetails>* verify_details,
58 ProofVerifierCallback* callback) OVERRIDE;
60 private:
61 class Job;
63 void OnJobComplete(Job* job);
65 // Set owning pointers to active jobs.
66 typedef std::set<Job*> JobSet;
67 JobSet active_jobs_;
69 // Underlying verifier used to verify certificates.
70 CertVerifier* const cert_verifier_;
72 DISALLOW_COPY_AND_ASSIGN(ProofVerifierChromium);
75 } // namespace net
77 #endif // NET_QUIC_CRYPTO_PROOF_VERIFIER_CHROMIUM_H_