OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_ | 5 #ifndef CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_ |
6 #define CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_ | 6 #define CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "chrome/browser/interstitials/security_interstitial_page.h" | |
15 #include "chrome/browser/ssl/ssl_cert_reporter.h" | 14 #include "chrome/browser/ssl/ssl_cert_reporter.h" |
| 15 #include "components/security_interstitials/content/security_interstitial_page.h
" |
16 #include "components/ssl_errors/error_classification.h" | 16 #include "components/ssl_errors/error_classification.h" |
17 #include "content/public/browser/certificate_request_result_type.h" | 17 #include "content/public/browser/certificate_request_result_type.h" |
18 #include "net/ssl/ssl_info.h" | 18 #include "net/ssl/ssl_info.h" |
19 | 19 |
20 class CertReportHelper; | 20 class CertReportHelper; |
21 class GURL; | 21 class GURL; |
22 | 22 |
23 namespace security_interstitials { | 23 namespace security_interstitials { |
24 class BadClockUI; | 24 class BadClockUI; |
25 } | 25 } |
26 | 26 |
27 // This class is responsible for showing/hiding the interstitial page that | 27 // This class is responsible for showing/hiding the interstitial page that |
28 // occurs when an SSL error is triggered by a clock misconfiguration. It | 28 // occurs when an SSL error is triggered by a clock misconfiguration. It |
29 // creates the UI using security_interstitials::BadClockUI and then | 29 // creates the UI using security_interstitials::BadClockUI and then |
30 // displays it. It deletes itself when the interstitial page is closed. | 30 // displays it. It deletes itself when the interstitial page is closed. |
31 class BadClockBlockingPage : public SecurityInterstitialPage { | 31 class BadClockBlockingPage |
| 32 : public security_interstitials::SecurityInterstitialPage { |
32 public: | 33 public: |
33 // Interstitial type, used in tests. | 34 // Interstitial type, used in tests. |
34 static InterstitialPageDelegate::TypeID kTypeForTesting; | 35 static InterstitialPageDelegate::TypeID kTypeForTesting; |
35 | 36 |
36 // If the blocking page isn't shown, the caller is responsible for cleaning | 37 // If the blocking page isn't shown, the caller is responsible for cleaning |
37 // up the blocking page. Otherwise, the interstitial takes ownership when | 38 // up the blocking page. Otherwise, the interstitial takes ownership when |
38 // shown. | 39 // shown. |
39 BadClockBlockingPage(content::WebContents* web_contents, | 40 BadClockBlockingPage(content::WebContents* web_contents, |
40 int cert_error, | 41 int cert_error, |
41 const net::SSLInfo& ssl_info, | 42 const net::SSLInfo& ssl_info, |
(...skipping 30 matching lines...) Expand all Loading... |
72 base::Callback<void(content::CertificateRequestResultType)> callback_; | 73 base::Callback<void(content::CertificateRequestResultType)> callback_; |
73 const net::SSLInfo ssl_info_; | 74 const net::SSLInfo ssl_info_; |
74 | 75 |
75 const std::unique_ptr<CertReportHelper> cert_report_helper_; | 76 const std::unique_ptr<CertReportHelper> cert_report_helper_; |
76 const std::unique_ptr<security_interstitials::BadClockUI> bad_clock_ui_; | 77 const std::unique_ptr<security_interstitials::BadClockUI> bad_clock_ui_; |
77 | 78 |
78 DISALLOW_COPY_AND_ASSIGN(BadClockBlockingPage); | 79 DISALLOW_COPY_AND_ASSIGN(BadClockBlockingPage); |
79 }; | 80 }; |
80 | 81 |
81 #endif // CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_ | 82 #endif // CHROME_BROWSER_SSL_BAD_CLOCK_BLOCKING_PAGE_H_ |
OLD | NEW |