Chromium Code Reviews| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { | 292 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { |
| 293 int cert_id = content::CertStore::GetInstance()->StoreCert( | 293 int cert_id = content::CertStore::GetInstance()->StoreCert( |
| 294 ssl_info_.cert.get(), web_contents()->GetRenderProcessHost()->GetID()); | 294 ssl_info_.cert.get(), web_contents()->GetRenderProcessHost()->GetID()); |
| 295 DCHECK(cert_id); | 295 DCHECK(cert_id); |
| 296 | 296 |
| 297 entry->GetSSL().security_style = | 297 entry->GetSSL().security_style = |
| 298 content::SECURITY_STYLE_AUTHENTICATION_BROKEN; | 298 content::SECURITY_STYLE_AUTHENTICATION_BROKEN; |
| 299 entry->GetSSL().cert_id = cert_id; | 299 entry->GetSSL().cert_id = cert_id; |
| 300 entry->GetSSL().cert_status = ssl_info_.cert_status; | 300 entry->GetSSL().cert_status = ssl_info_.cert_status; |
| 301 entry->GetSSL().security_bits = ssl_info_.security_bits; | 301 entry->GetSSL().security_bits = ssl_info_.security_bits; |
| 302 entry->GetSSL().connection_status = ssl_info_.connection_status; | |
|
meacer
2015/09/08 23:05:54
Looks like BadClockBlockingPage doesn't set this e
estark
2015/09/08 23:19:58
Ouch, good point. BadClockBlockingPage does need t
| |
| 302 } | 303 } |
| 303 | 304 |
| 304 void SSLBlockingPage::SetSSLCertReporterForTesting( | 305 void SSLBlockingPage::SetSSLCertReporterForTesting( |
| 305 scoped_ptr<SSLCertReporter> ssl_cert_reporter) { | 306 scoped_ptr<SSLCertReporter> ssl_cert_reporter) { |
| 306 cert_report_helper_->SetSSLCertReporterForTesting(ssl_cert_reporter.Pass()); | 307 cert_report_helper_->SetSSLCertReporterForTesting(ssl_cert_reporter.Pass()); |
| 307 } | 308 } |
| 308 | 309 |
| 309 // This handles the commands sent from the interstitial JavaScript. | 310 // This handles the commands sent from the interstitial JavaScript. |
| 310 // DO NOT reorder or change this logic without also changing the JavaScript! | 311 // DO NOT reorder or change this logic without also changing the JavaScript! |
| 311 void SSLBlockingPage::CommandReceived(const std::string& command) { | 312 void SSLBlockingPage::CommandReceived(const std::string& command) { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 445 !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT) && | 446 !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT) && |
| 446 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); | 447 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); |
| 447 return is_overridable; | 448 return is_overridable; |
| 448 } | 449 } |
| 449 | 450 |
| 450 // static | 451 // static |
| 451 bool SSLBlockingPage::DoesPolicyAllowDangerOverride( | 452 bool SSLBlockingPage::DoesPolicyAllowDangerOverride( |
| 452 const Profile* const profile) { | 453 const Profile* const profile) { |
| 453 return profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); | 454 return profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); |
| 454 } | 455 } |
| OLD | NEW |