| 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/build_time.h" | 7 #include "base/build_time.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 base::TimeFormatShortDate(ssl_info_.cert->valid_expiry())); | 522 base::TimeFormatShortDate(ssl_info_.cert->valid_expiry())); |
| 523 load_time_data.SetString( | 523 load_time_data.SetString( |
| 524 "currentDate", base::TimeFormatShortDate(now)); | 524 "currentDate", base::TimeFormatShortDate(now)); |
| 525 std::vector<std::string> encoded_chain; | 525 std::vector<std::string> encoded_chain; |
| 526 ssl_info_.cert->GetPEMEncodedChain(&encoded_chain); | 526 ssl_info_.cert->GetPEMEncodedChain(&encoded_chain); |
| 527 load_time_data.SetString("pem", JoinString(encoded_chain, std::string())); | 527 load_time_data.SetString("pem", JoinString(encoded_chain, std::string())); |
| 528 | 528 |
| 529 base::StringPiece html( | 529 base::StringPiece html( |
| 530 ResourceBundle::GetSharedInstance().GetRawDataResource( | 530 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 531 IRD_SECURITY_INTERSTITIAL_HTML)); | 531 IRD_SECURITY_INTERSTITIAL_HTML)); |
| 532 webui::UseVersion2 version; | |
| 533 return webui::GetI18nTemplateHtml(html, &load_time_data); | 532 return webui::GetI18nTemplateHtml(html, &load_time_data); |
| 534 } | 533 } |
| 535 | 534 |
| 536 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { | 535 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { |
| 537 int cert_id = content::CertStore::GetInstance()->StoreCert( | 536 int cert_id = content::CertStore::GetInstance()->StoreCert( |
| 538 ssl_info_.cert.get(), web_contents_->GetRenderProcessHost()->GetID()); | 537 ssl_info_.cert.get(), web_contents_->GetRenderProcessHost()->GetID()); |
| 539 DCHECK(cert_id); | 538 DCHECK(cert_id); |
| 540 | 539 |
| 541 entry->GetSSL().security_style = | 540 entry->GetSSL().security_style = |
| 542 content::SECURITY_STYLE_AUTHENTICATION_BROKEN; | 541 content::SECURITY_STYLE_AUTHENTICATION_BROKEN; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 for (; i < 5; i++) { | 667 for (; i < 5; i++) { |
| 669 strings->SetString(keys[i], std::string()); | 668 strings->SetString(keys[i], std::string()); |
| 670 } | 669 } |
| 671 } | 670 } |
| 672 | 671 |
| 673 void SSLBlockingPage::OnGotHistoryCount(bool success, | 672 void SSLBlockingPage::OnGotHistoryCount(bool success, |
| 674 int num_visits, | 673 int num_visits, |
| 675 base::Time first_visit) { | 674 base::Time first_visit) { |
| 676 num_visits_ = num_visits; | 675 num_visits_ = num_visits; |
| 677 } | 676 } |
| OLD | NEW |