| 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/build_time.h" | 9 #include "base/build_time.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 "issuer", ssl_info_.cert->issuer().GetDisplayName()); | 448 "issuer", ssl_info_.cert->issuer().GetDisplayName()); |
| 449 load_time_data->SetString( | 449 load_time_data->SetString( |
| 450 "expirationDate", | 450 "expirationDate", |
| 451 base::TimeFormatShortDate(ssl_info_.cert->valid_expiry())); | 451 base::TimeFormatShortDate(ssl_info_.cert->valid_expiry())); |
| 452 load_time_data->SetString( | 452 load_time_data->SetString( |
| 453 "currentDate", base::TimeFormatShortDate(time_triggered_)); | 453 "currentDate", base::TimeFormatShortDate(time_triggered_)); |
| 454 std::vector<std::string> encoded_chain; | 454 std::vector<std::string> encoded_chain; |
| 455 ssl_info_.cert->GetPEMEncodedChain( | 455 ssl_info_.cert->GetPEMEncodedChain( |
| 456 &encoded_chain); | 456 &encoded_chain); |
| 457 load_time_data->SetString( | 457 load_time_data->SetString( |
| 458 "pem", base::JoinString(encoded_chain, base::StringPiece())); | 458 "pem", JoinString(encoded_chain, std::string())); |
| 459 | 459 |
| 460 cert_report_helper_->PopulateExtendedReportingOption(load_time_data); | 460 cert_report_helper_->PopulateExtendedReportingOption(load_time_data); |
| 461 } | 461 } |
| 462 | 462 |
| 463 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { | 463 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { |
| 464 int cert_id = content::CertStore::GetInstance()->StoreCert( | 464 int cert_id = content::CertStore::GetInstance()->StoreCert( |
| 465 ssl_info_.cert.get(), web_contents()->GetRenderProcessHost()->GetID()); | 465 ssl_info_.cert.get(), web_contents()->GetRenderProcessHost()->GetID()); |
| 466 DCHECK(cert_id); | 466 DCHECK(cert_id); |
| 467 | 467 |
| 468 entry->GetSSL().security_style = | 468 entry->GetSSL().security_style = |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT) && | 645 !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT) && |
| 646 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); | 646 profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); |
| 647 return is_overridable; | 647 return is_overridable; |
| 648 } | 648 } |
| 649 | 649 |
| 650 // static | 650 // static |
| 651 bool SSLBlockingPage::DoesPolicyAllowDangerOverride( | 651 bool SSLBlockingPage::DoesPolicyAllowDangerOverride( |
| 652 const Profile* const profile) { | 652 const Profile* const profile) { |
| 653 return profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); | 653 return profile->GetPrefs()->GetBoolean(prefs::kSSLErrorOverrideAllowed); |
| 654 } | 654 } |
| OLD | NEW |