| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SSL_BLOCKING_PAGE_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
| 6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 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/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/task/cancelable_task_tracker.h" | 14 #include "base/task/cancelable_task_tracker.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "chrome/browser/interstitials/security_interstitial_page.h" | |
| 17 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/ssl/ssl_cert_reporter.h" | 17 #include "chrome/browser/ssl/ssl_cert_reporter.h" |
| 19 #include "components/certificate_reporting/error_report.h" | 18 #include "components/certificate_reporting/error_report.h" |
| 19 #include "components/security_interstitials/content/security_interstitial_page.h
" |
| 20 #include "content/public/browser/certificate_request_result_type.h" | 20 #include "content/public/browser/certificate_request_result_type.h" |
| 21 #include "extensions/features/features.h" | 21 #include "extensions/features/features.h" |
| 22 #include "net/ssl/ssl_info.h" | 22 #include "net/ssl/ssl_info.h" |
| 23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 24 | 24 |
| 25 namespace policy { | 25 namespace policy { |
| 26 class PolicyTest_SSLErrorOverridingDisallowed_Test; | 26 class PolicyTest_SSLErrorOverridingDisallowed_Test; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace security_interstitials { | 29 namespace security_interstitials { |
| 30 class SSLErrorUI; | 30 class SSLErrorUI; |
| 31 } | 31 } |
| 32 | 32 |
| 33 class CertReportHelper; | 33 class CertReportHelper; |
| 34 class SSLUITest; | 34 class SSLUITest; |
| 35 class ChromeMetricsHelper; | 35 class ChromeMetricsHelper; |
| 36 | 36 |
| 37 // This class is responsible for showing/hiding the interstitial page that is | 37 // This class is responsible for showing/hiding the interstitial page that is |
| 38 // shown when a certificate error happens. | 38 // shown when a certificate error happens. |
| 39 // It deletes itself when the interstitial page is closed. | 39 // It deletes itself when the interstitial page is closed. |
| 40 class SSLBlockingPage : public SecurityInterstitialPage { | 40 class SSLBlockingPage |
| 41 : public security_interstitials::SecurityInterstitialPage { |
| 41 public: | 42 public: |
| 42 // Interstitial type, used in tests. | 43 // Interstitial type, used in tests. |
| 43 static InterstitialPageDelegate::TypeID kTypeForTesting; | 44 static InterstitialPageDelegate::TypeID kTypeForTesting; |
| 44 | 45 |
| 45 ~SSLBlockingPage() override; | 46 ~SSLBlockingPage() override; |
| 46 | 47 |
| 47 // Creates an SSL blocking page. If the blocking page isn't shown, the caller | 48 // Creates an SSL blocking page. If the blocking page isn't shown, the caller |
| 48 // is responsible for cleaning up the blocking page, otherwise the | 49 // is responsible for cleaning up the blocking page, otherwise the |
| 49 // interstitial takes ownership when shown. |options_mask| must be a bitwise | 50 // interstitial takes ownership when shown. |options_mask| must be a bitwise |
| 50 // mask of SSLErrorUI::SSLErrorOptionsMask values. | 51 // mask of SSLErrorUI::SSLErrorOptionsMask values. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // expired. | 112 // expired. |
| 112 const bool expired_but_previously_allowed_; | 113 const bool expired_but_previously_allowed_; |
| 113 | 114 |
| 114 const std::unique_ptr<CertReportHelper> cert_report_helper_; | 115 const std::unique_ptr<CertReportHelper> cert_report_helper_; |
| 115 const std::unique_ptr<security_interstitials::SSLErrorUI> ssl_error_ui_; | 116 const std::unique_ptr<security_interstitials::SSLErrorUI> ssl_error_ui_; |
| 116 | 117 |
| 117 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); | 118 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); |
| 118 }; | 119 }; |
| 119 | 120 |
| 120 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 121 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
| OLD | NEW |