Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / browser / renderer_host / pepper / ssl_context_helper.h
blobf1da2a6ee1dbc708c081619ab3dfad5d5cd62fa0
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 CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "net/ssl/ssl_config_service.h"
13 namespace net {
14 class CertVerifier;
15 class TransportSecurityState;
18 namespace content {
20 class SSLContextHelper : public base::RefCounted<SSLContextHelper> {
21 public:
22 SSLContextHelper();
24 net::CertVerifier* GetCertVerifier();
25 net::TransportSecurityState* GetTransportSecurityState();
26 const net::SSLConfig& ssl_config() { return ssl_config_; }
28 private:
29 friend class base::RefCounted<SSLContextHelper>;
31 ~SSLContextHelper();
33 // This is lazily created. Users should use GetCertVerifier to retrieve it.
34 scoped_ptr<net::CertVerifier> cert_verifier_;
35 // This is lazily created. Users should use GetTransportSecurityState to
36 // retrieve it.
37 scoped_ptr<net::TransportSecurityState> transport_security_state_;
39 // The default SSL configuration settings are used, as opposed to Chrome's SSL
40 // settings.
41 net::SSLConfig ssl_config_;
43 DISALLOW_COPY_AND_ASSIGN(SSLContextHelper);
46 } // namespace content
48 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_