| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "net/ssl/ssl_config_service.h" | 12 #include "net/ssl/ssl_config_service.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 class CertVerifier; | 15 class CertVerifier; |
| 16 class CTPolicyEnforcer; |
| 17 class CTVerifier; |
| 16 class TransportSecurityState; | 18 class TransportSecurityState; |
| 17 } | 19 } |
| 18 | 20 |
| 19 namespace content { | 21 namespace content { |
| 20 | 22 |
| 21 class SSLContextHelper : public base::RefCounted<SSLContextHelper> { | 23 class SSLContextHelper : public base::RefCounted<SSLContextHelper> { |
| 22 public: | 24 public: |
| 23 SSLContextHelper(); | 25 SSLContextHelper(); |
| 24 | 26 |
| 25 net::CertVerifier* GetCertVerifier(); | 27 net::CertVerifier* GetCertVerifier(); |
| 26 net::TransportSecurityState* GetTransportSecurityState(); | 28 net::TransportSecurityState* GetTransportSecurityState(); |
| 29 net::CTVerifier* GetCertTransparencyVerifier(); |
| 30 net::CTPolicyEnforcer* GetCTPolicyEnforcer(); |
| 27 const net::SSLConfig& ssl_config() { return ssl_config_; } | 31 const net::SSLConfig& ssl_config() { return ssl_config_; } |
| 28 | 32 |
| 29 private: | 33 private: |
| 30 friend class base::RefCounted<SSLContextHelper>; | 34 friend class base::RefCounted<SSLContextHelper>; |
| 31 | 35 |
| 32 ~SSLContextHelper(); | 36 ~SSLContextHelper(); |
| 33 | 37 |
| 34 // This is lazily created. Users should use GetCertVerifier to retrieve it. | 38 // This is lazily created. Users should use GetCertVerifier to retrieve it. |
| 35 std::unique_ptr<net::CertVerifier> cert_verifier_; | 39 std::unique_ptr<net::CertVerifier> cert_verifier_; |
| 36 // This is lazily created. Users should use GetTransportSecurityState to | 40 // This is lazily created. Users should use GetTransportSecurityState to |
| 37 // retrieve it. | 41 // retrieve it. |
| 38 std::unique_ptr<net::TransportSecurityState> transport_security_state_; | 42 std::unique_ptr<net::TransportSecurityState> transport_security_state_; |
| 43 // This is lazily created. Users should use GetCertTransparencyVerifier to |
| 44 // retrieve it. |
| 45 std::unique_ptr<net::CTVerifier> cert_transparency_verifier_; |
| 46 // This is lazily created. Users should use GetCTPolicyEnforcer to |
| 47 // retrieve it. |
| 48 std::unique_ptr<net::CTPolicyEnforcer> ct_policy_enforcer_; |
| 39 | 49 |
| 40 // The default SSL configuration settings are used, as opposed to Chrome's SSL | 50 // The default SSL configuration settings are used, as opposed to Chrome's SSL |
| 41 // settings. | 51 // settings. |
| 42 net::SSLConfig ssl_config_; | 52 net::SSLConfig ssl_config_; |
| 43 | 53 |
| 44 DISALLOW_COPY_AND_ASSIGN(SSLContextHelper); | 54 DISALLOW_COPY_AND_ASSIGN(SSLContextHelper); |
| 45 }; | 55 }; |
| 46 | 56 |
| 47 } // namespace content | 57 } // namespace content |
| 48 | 58 |
| 49 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_ | 59 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_ |
| OLD | NEW |