• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 
5 #ifndef CEF_LIBCEF_BROWSER_SSL_STATUS_IMPL_H_
6 #define CEF_LIBCEF_BROWSER_SSL_STATUS_IMPL_H_
7 #pragma once
8 
9 #include "include/cef_ssl_status.h"
10 
11 #include "content/public/browser/ssl_status.h"
12 
13 // CefSSLStatus implementation
14 class CefSSLStatusImpl : public CefSSLStatus {
15  public:
16   explicit CefSSLStatusImpl(const content::SSLStatus& value);
17 
18   // CefSSLStatus methods.
19   bool IsSecureConnection() override;
20   cef_cert_status_t GetCertStatus() override;
21   cef_ssl_version_t GetSSLVersion() override;
22   cef_ssl_content_status_t GetContentStatus() override;
23   CefRefPtr<CefX509Certificate> GetX509Certificate() override;
24 
25  private:
26   cef_cert_status_t cert_status_;
27   cef_ssl_version_t ssl_version_;
28   cef_ssl_content_status_t content_status_;
29 
30   // Don't create a CefX509Certificate object until requested.
31   scoped_refptr<net::X509Certificate> certificate_;
32   CefRefPtr<CefX509Certificate> cef_certificate_;
33 
34   IMPLEMENT_REFCOUNTING(CefSSLStatusImpl);
35   DISALLOW_COPY_AND_ASSIGN(CefSSLStatusImpl);
36 };
37 
38 #endif  // CEF_LIBCEF_BROWSER_SSL_STATUS_IMPL_H_
39