| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // it leaks memory, so don't create it here. | 61 // it leaks memory, so don't create it here. |
| 62 BadClockBlockingPage::BadClockBlockingPage( | 62 BadClockBlockingPage::BadClockBlockingPage( |
| 63 content::WebContents* web_contents, | 63 content::WebContents* web_contents, |
| 64 int cert_error, | 64 int cert_error, |
| 65 const net::SSLInfo& ssl_info, | 65 const net::SSLInfo& ssl_info, |
| 66 const GURL& request_url, | 66 const GURL& request_url, |
| 67 const base::Time& time_triggered, | 67 const base::Time& time_triggered, |
| 68 ssl_errors::ClockState clock_state, | 68 ssl_errors::ClockState clock_state, |
| 69 std::unique_ptr<SSLCertReporter> ssl_cert_reporter, | 69 std::unique_ptr<SSLCertReporter> ssl_cert_reporter, |
| 70 const base::Callback<void(content::CertificateRequestResultType)>& callback) | 70 const base::Callback<void(content::CertificateRequestResultType)>& callback) |
| 71 : SecurityInterstitialPage(web_contents, | 71 : SecurityInterstitialPage( |
| 72 request_url, | 72 web_contents, |
| 73 CreateMetricsHelper(web_contents, request_url)), | 73 request_url, |
| 74 base::MakeUnique<ChromeControllerClient>( |
| 75 web_contents, |
| 76 CreateMetricsHelper(web_contents, request_url))), |
| 74 callback_(callback), | 77 callback_(callback), |
| 75 ssl_info_(ssl_info), | 78 ssl_info_(ssl_info), |
| 76 cert_report_helper_(new CertReportHelper( | 79 cert_report_helper_(new CertReportHelper( |
| 77 std::move(ssl_cert_reporter), | 80 std::move(ssl_cert_reporter), |
| 78 web_contents, | 81 web_contents, |
| 79 request_url, | 82 request_url, |
| 80 ssl_info, | 83 ssl_info, |
| 81 certificate_reporting::ErrorReport::INTERSTITIAL_CLOCK, | 84 certificate_reporting::ErrorReport::INTERSTITIAL_CLOCK, |
| 82 false /* overridable */, | 85 false /* overridable */, |
| 83 time_triggered, | 86 time_triggered, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 void BadClockBlockingPage::NotifyDenyCertificate() { | 174 void BadClockBlockingPage::NotifyDenyCertificate() { |
| 172 // It's possible that callback_ may not exist if the user clicks "Proceed" | 175 // It's possible that callback_ may not exist if the user clicks "Proceed" |
| 173 // followed by pressing the back button before the interstitial is hidden. | 176 // followed by pressing the back button before the interstitial is hidden. |
| 174 // In that case the certificate will still be treated as allowed. | 177 // In that case the certificate will still be treated as allowed. |
| 175 if (callback_.is_null()) | 178 if (callback_.is_null()) |
| 176 return; | 179 return; |
| 177 | 180 |
| 178 base::ResetAndReturn(&callback_) | 181 base::ResetAndReturn(&callback_) |
| 179 .Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); | 182 .Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); |
| 180 } | 183 } |
| OLD | NEW |