| 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 if (strict_enforcement_) | 507 if (strict_enforcement_) |
| 508 help_string = IDS_SSL_NONOVERRIDABLE_HSTS; | 508 help_string = IDS_SSL_NONOVERRIDABLE_HSTS; |
| 509 } | 509 } |
| 510 load_time_data.SetString( | 510 load_time_data.SetString( |
| 511 "finalParagraph", l10n_util::GetStringFUTF16(help_string, url)); | 511 "finalParagraph", l10n_util::GetStringFUTF16(help_string, url)); |
| 512 } | 512 } |
| 513 | 513 |
| 514 base::StringPiece html( | 514 base::StringPiece html( |
| 515 ResourceBundle::GetSharedInstance().GetRawDataResource( | 515 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 516 IRD_SECURITY_INTERSTITIAL_HTML)); | 516 IRD_SECURITY_INTERSTITIAL_HTML)); |
| 517 webui::UseVersion2 version; | |
| 518 return webui::GetI18nTemplateHtml(html, &load_time_data); | 517 return webui::GetI18nTemplateHtml(html, &load_time_data); |
| 519 } | 518 } |
| 520 | 519 |
| 521 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { | 520 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { |
| 522 int cert_id = content::CertStore::GetInstance()->StoreCert( | 521 int cert_id = content::CertStore::GetInstance()->StoreCert( |
| 523 ssl_info_.cert.get(), web_contents_->GetRenderProcessHost()->GetID()); | 522 ssl_info_.cert.get(), web_contents_->GetRenderProcessHost()->GetID()); |
| 524 DCHECK(cert_id); | 523 DCHECK(cert_id); |
| 525 | 524 |
| 526 entry->GetSSL().security_style = | 525 entry->GetSSL().security_style = |
| 527 content::SECURITY_STYLE_AUTHENTICATION_BROKEN; | 526 content::SECURITY_STYLE_AUTHENTICATION_BROKEN; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 for (; i < 5; i++) { | 652 for (; i < 5; i++) { |
| 654 strings->SetString(keys[i], std::string()); | 653 strings->SetString(keys[i], std::string()); |
| 655 } | 654 } |
| 656 } | 655 } |
| 657 | 656 |
| 658 void SSLBlockingPage::OnGotHistoryCount(bool success, | 657 void SSLBlockingPage::OnGotHistoryCount(bool success, |
| 659 int num_visits, | 658 int num_visits, |
| 660 base::Time first_visit) { | 659 base::Time first_visit) { |
| 661 num_visits_ = num_visits; | 660 num_visits_ = num_visits; |
| 662 } | 661 } |
| OLD | NEW |