| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 GetSamplingEventName(overridable_, cert_error)); | 149 GetSamplingEventName(overridable_, cert_error)); |
| 150 chrome_metrics_helper->StartRecordingCaptivePortalMetrics(overridable_); | 150 chrome_metrics_helper->StartRecordingCaptivePortalMetrics(overridable_); |
| 151 controller_->set_metrics_helper(make_scoped_ptr(chrome_metrics_helper)); | 151 controller_->set_metrics_helper(make_scoped_ptr(chrome_metrics_helper)); |
| 152 | 152 |
| 153 cert_report_helper_.reset(new CertReportHelper( | 153 cert_report_helper_.reset(new CertReportHelper( |
| 154 std::move(ssl_cert_reporter), web_contents, request_url, ssl_info, | 154 std::move(ssl_cert_reporter), web_contents, request_url, ssl_info, |
| 155 certificate_reporting::ErrorReport::INTERSTITIAL_SSL, overridable_, | 155 certificate_reporting::ErrorReport::INTERSTITIAL_SSL, overridable_, |
| 156 controller_->metrics_helper())); | 156 controller_->metrics_helper())); |
| 157 | 157 |
| 158 ssl_error_ui_.reset(new SSLErrorUI(request_url, cert_error, ssl_info, | 158 ssl_error_ui_.reset(new SSLErrorUI(request_url, cert_error, ssl_info, |
| 159 options_mask, time_triggered, languages, | 159 options_mask, time_triggered, |
| 160 controller_.get())); | 160 g_browser_process->network_time_tracker(), |
| 161 languages, controller_.get())); |
| 161 | 162 |
| 162 // Creating an interstitial without showing (e.g. from chrome://interstitials) | 163 // Creating an interstitial without showing (e.g. from chrome://interstitials) |
| 163 // it leaks memory, so don't create it here. | 164 // it leaks memory, so don't create it here. |
| 164 } | 165 } |
| 165 | 166 |
| 166 bool SSLBlockingPage::ShouldCreateNewNavigation() const { | 167 bool SSLBlockingPage::ShouldCreateNewNavigation() const { |
| 167 return true; | 168 return true; |
| 168 } | 169 } |
| 169 | 170 |
| 170 InterstitialPageDelegate::TypeID SSLBlockingPage::GetTypeForTesting() const { | 171 InterstitialPageDelegate::TypeID SSLBlockingPage::GetTypeForTesting() const { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 278 |
| 278 // static | 279 // static |
| 279 bool SSLBlockingPage::IsOverridable(int options_mask, | 280 bool SSLBlockingPage::IsOverridable(int options_mask, |
| 280 const Profile* const profile) { | 281 const Profile* const profile) { |
| 281 const bool is_overridable = | 282 const bool is_overridable = |
| 282 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && | 283 (options_mask & SSLErrorUI::SOFT_OVERRIDE_ENABLED) && |
| 283 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT) && | 284 !(options_mask & SSLErrorUI::STRICT_ENFORCEMENT) && |
| 284 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); | 285 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); |
| 285 return is_overridable; | 286 return is_overridable; |
| 286 } | 287 } |
| OLD | NEW |