| 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 #include "chrome/browser/ssl/ssl_blocking_page.h" | 5 #include "chrome/browser/ssl/ssl_blocking_page.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 overridable_(overridable), | 203 overridable_(overridable), |
| 204 expired_but_previously_allowed_( | 204 expired_but_previously_allowed_( |
| 205 (options_mask & SSLErrorUI::EXPIRED_BUT_PREVIOUSLY_ALLOWED) != 0), | 205 (options_mask & SSLErrorUI::EXPIRED_BUT_PREVIOUSLY_ALLOWED) != 0), |
| 206 cert_report_helper_(new CertReportHelper( | 206 cert_report_helper_(new CertReportHelper( |
| 207 std::move(ssl_cert_reporter), | 207 std::move(ssl_cert_reporter), |
| 208 web_contents, | 208 web_contents, |
| 209 request_url, | 209 request_url, |
| 210 ssl_info, | 210 ssl_info, |
| 211 certificate_reporting::ErrorReport::INTERSTITIAL_SSL, | 211 certificate_reporting::ErrorReport::INTERSTITIAL_SSL, |
| 212 overridable_, | 212 overridable_, |
| 213 time_triggered, |
| 213 controller()->metrics_helper())), | 214 controller()->metrics_helper())), |
| 214 ssl_error_ui_(new SSLErrorUI(request_url, | 215 ssl_error_ui_(new SSLErrorUI(request_url, |
| 215 cert_error, | 216 cert_error, |
| 216 ssl_info, | 217 ssl_info, |
| 217 options_mask, | 218 options_mask, |
| 218 time_triggered, | 219 time_triggered, |
| 219 controller())) { | 220 controller())) { |
| 220 // Creating an interstitial without showing (e.g. from chrome://interstitials) | 221 // Creating an interstitial without showing (e.g. from chrome://interstitials) |
| 221 // it leaks memory, so don't create it here. | 222 // it leaks memory, so don't create it here. |
| 222 } | 223 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 291 |
| 291 // static | 292 // static |
| 292 bool SSLBlockingPage::IsOverridable(int options_mask, | 293 bool SSLBlockingPage::IsOverridable(int options_mask, |
| 293 const Profile* const profile) { | 294 const Profile* const profile) { |
| 294 const bool is_overridable = | 295 const bool is_overridable = |
| 295 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && | 296 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && |
| 296 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT) && | 297 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT) && |
| 297 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); | 298 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); |
| 298 return is_overridable; | 299 return is_overridable; |
| 299 } | 300 } |
| OLD | NEW |