#ifndef NET_QUIC_CRYPTO_PROOF_VERIFIER_CHROMIUM_H_
#define NET_QUIC_CRYPTO_PROOF_VERIFIER_CHROMIUM_H_
#include <set>
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "net/base/net_export.h"
#include "net/base/net_log.h"
#include "net/cert/cert_verify_result.h"
#include "net/cert/x509_certificate.h"
#include "net/quic/crypto/proof_verifier.h"
namespace net {
class CertVerifier;
class SingleRequestCertVerifier;
struct ProofVerifyDetailsChromium : public ProofVerifyDetails {
public:
CertVerifyResult cert_verify_result;
};
struct ProofVerifyContextChromium : public ProofVerifyContext {
public:
explicit ProofVerifyContextChromium(const BoundNetLog& net_log)
: net_log(net_log) {}
BoundNetLog net_log;
};
class NET_EXPORT_PRIVATE ProofVerifierChromium : public ProofVerifier {
public:
explicit ProofVerifierChromium(CertVerifier* cert_verifier);
virtual ~ProofVerifierChromium();
virtual Status VerifyProof(const std::string& hostname,
const std::string& server_config,
const std::vector<std::string>& certs,
const std::string& signature,
const ProofVerifyContext* verify_context,
std::string* error_details,
scoped_ptr<ProofVerifyDetails>* verify_details,
ProofVerifierCallback* callback) OVERRIDE;
private:
class Job;
void OnJobComplete(Job* job);
typedef std::set<Job*> JobSet;
JobSet active_jobs_;
CertVerifier* const cert_verifier_;
DISALLOW_COPY_AND_ASSIGN(ProofVerifierChromium);
};
}
#endif