| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/captive_portal_blocking_page.h" | 5 #include "chrome/browser/ssl/captive_portal_blocking_page.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 CreateMetricsHelper(web_contents, request_url)), | 81 CreateMetricsHelper(web_contents, request_url)), |
| 82 login_url_(login_url), | 82 login_url_(login_url), |
| 83 ssl_info_(ssl_info), | 83 ssl_info_(ssl_info), |
| 84 callback_(callback) { | 84 callback_(callback) { |
| 85 DCHECK(login_url_.is_valid()); | 85 DCHECK(login_url_.is_valid()); |
| 86 | 86 |
| 87 if (ssl_cert_reporter) { | 87 if (ssl_cert_reporter) { |
| 88 cert_report_helper_.reset(new CertReportHelper( | 88 cert_report_helper_.reset(new CertReportHelper( |
| 89 std::move(ssl_cert_reporter), web_contents, request_url, ssl_info, | 89 std::move(ssl_cert_reporter), web_contents, request_url, ssl_info, |
| 90 certificate_reporting::ErrorReport::INTERSTITIAL_CAPTIVE_PORTAL, false, | 90 certificate_reporting::ErrorReport::INTERSTITIAL_CAPTIVE_PORTAL, false, |
| 91 nullptr)); | 91 base::Time::Now(), nullptr)); |
| 92 } | 92 } |
| 93 | 93 |
| 94 RecordUMA(SHOW_ALL); | 94 RecordUMA(SHOW_ALL); |
| 95 } | 95 } |
| 96 | 96 |
| 97 CaptivePortalBlockingPage::~CaptivePortalBlockingPage() { | 97 CaptivePortalBlockingPage::~CaptivePortalBlockingPage() { |
| 98 } | 98 } |
| 99 | 99 |
| 100 const void* CaptivePortalBlockingPage::GetTypeForTesting() const { | 100 const void* CaptivePortalBlockingPage::GetTypeForTesting() const { |
| 101 return CaptivePortalBlockingPage::kTypeForTesting; | 101 return CaptivePortalBlockingPage::kTypeForTesting; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 certificate_reporting::ErrorReport::USER_DID_NOT_PROCEED); | 264 certificate_reporting::ErrorReport::USER_DID_NOT_PROCEED); |
| 265 } | 265 } |
| 266 | 266 |
| 267 // Need to explicity deny the certificate via the callback, otherwise memory | 267 // Need to explicity deny the certificate via the callback, otherwise memory |
| 268 // is leaked. | 268 // is leaked. |
| 269 if (!callback_.is_null()) { | 269 if (!callback_.is_null()) { |
| 270 callback_.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); | 270 callback_.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); |
| 271 callback_.Reset(); | 271 callback_.Reset(); |
| 272 } | 272 } |
| 273 } | 273 } |
| OLD | NEW |