| 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 #include "chrome/browser/ssl/bad_clock_blocking_page.h" | 5 #include "chrome/browser/ssl/bad_clock_blocking_page.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const GURL& request_url, | 65 const GURL& request_url, |
| 66 const base::Time& time_triggered, | 66 const base::Time& time_triggered, |
| 67 ssl_errors::ClockState clock_state, | 67 ssl_errors::ClockState clock_state, |
| 68 std::unique_ptr<SSLCertReporter> ssl_cert_reporter, | 68 std::unique_ptr<SSLCertReporter> ssl_cert_reporter, |
| 69 const base::Callback<void(content::CertificateRequestResultType)>& callback) | 69 const base::Callback<void(content::CertificateRequestResultType)>& callback) |
| 70 : SecurityInterstitialPage(web_contents, | 70 : SecurityInterstitialPage(web_contents, |
| 71 request_url, | 71 request_url, |
| 72 CreateMetricsHelper(web_contents, request_url)), | 72 CreateMetricsHelper(web_contents, request_url)), |
| 73 callback_(callback), | 73 callback_(callback), |
| 74 ssl_info_(ssl_info), | 74 ssl_info_(ssl_info), |
| 75 time_triggered_(time_triggered), | |
| 76 cert_report_helper_(new CertReportHelper( | 75 cert_report_helper_(new CertReportHelper( |
| 77 std::move(ssl_cert_reporter), | 76 std::move(ssl_cert_reporter), |
| 78 web_contents, | 77 web_contents, |
| 79 request_url, | 78 request_url, |
| 80 ssl_info, | 79 ssl_info, |
| 81 certificate_reporting::ErrorReport::INTERSTITIAL_CLOCK, | 80 certificate_reporting::ErrorReport::INTERSTITIAL_CLOCK, |
| 82 false /* overridable */, | 81 false /* overridable */, |
| 82 time_triggered, |
| 83 controller()->metrics_helper())), | 83 controller()->metrics_helper())), |
| 84 bad_clock_ui_(new security_interstitials::BadClockUI(request_url, | 84 bad_clock_ui_(new security_interstitials::BadClockUI(request_url, |
| 85 cert_error, | 85 cert_error, |
| 86 ssl_info, | 86 ssl_info, |
| 87 time_triggered, | 87 time_triggered, |
| 88 clock_state, | 88 clock_state, |
| 89 controller())) {} | 89 controller())) {} |
| 90 | 90 |
| 91 BadClockBlockingPage::~BadClockBlockingPage() { | 91 BadClockBlockingPage::~BadClockBlockingPage() { |
| 92 if (!callback_.is_null()) { | 92 if (!callback_.is_null()) { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 void BadClockBlockingPage::NotifyDenyCertificate() { | 153 void BadClockBlockingPage::NotifyDenyCertificate() { |
| 154 // It's possible that callback_ may not exist if the user clicks "Proceed" | 154 // It's possible that callback_ may not exist if the user clicks "Proceed" |
| 155 // followed by pressing the back button before the interstitial is hidden. | 155 // followed by pressing the back button before the interstitial is hidden. |
| 156 // In that case the certificate will still be treated as allowed. | 156 // In that case the certificate will still be treated as allowed. |
| 157 if (callback_.is_null()) | 157 if (callback_.is_null()) |
| 158 return; | 158 return; |
| 159 | 159 |
| 160 base::ResetAndReturn(&callback_) | 160 base::ResetAndReturn(&callback_) |
| 161 .Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); | 161 .Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); |
| 162 } | 162 } |
| OLD | NEW |