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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 default: | 511 default: |
512 if (strict_enforcement_) | 512 if (strict_enforcement_) |
513 help_string = IDS_SSL_NONOVERRIDABLE_HSTS; | 513 help_string = IDS_SSL_NONOVERRIDABLE_HSTS; |
514 } | 514 } |
515 load_time_data.SetString( | 515 load_time_data.SetString( |
516 "finalParagraph", l10n_util::GetStringFUTF16(help_string, url)); | 516 "finalParagraph", l10n_util::GetStringFUTF16(help_string, url)); |
517 } | 517 } |
518 | 518 |
519 base::StringPiece html( | 519 base::StringPiece html( |
520 ResourceBundle::GetSharedInstance().GetRawDataResource( | 520 ResourceBundle::GetSharedInstance().GetRawDataResource( |
521 IRD_SSL_INTERSTITIAL_V2_HTML)); | 521 IRD_SECURITY_INTERSTITIAL_HTML)); |
522 webui::UseVersion2 version; | 522 webui::UseVersion2 version; |
523 return webui::GetI18nTemplateHtml(html, &load_time_data); | 523 return webui::GetI18nTemplateHtml(html, &load_time_data); |
524 } | 524 } |
525 | 525 |
526 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { | 526 void SSLBlockingPage::OverrideEntry(NavigationEntry* entry) { |
527 int cert_id = content::CertStore::GetInstance()->StoreCert( | 527 int cert_id = content::CertStore::GetInstance()->StoreCert( |
528 ssl_info_.cert.get(), web_contents_->GetRenderProcessHost()->GetID()); | 528 ssl_info_.cert.get(), web_contents_->GetRenderProcessHost()->GetID()); |
529 DCHECK(cert_id); | 529 DCHECK(cert_id); |
530 | 530 |
531 entry->GetSSL().security_style = | 531 entry->GetSSL().security_style = |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 // sure we don't clear the captive portal flag, since the interstitial was | 696 // sure we don't clear the captive portal flag, since the interstitial was |
697 // potentially caused by the captive portal. | 697 // potentially caused by the captive portal. |
698 captive_portal_detected_ = captive_portal_detected_ || | 698 captive_portal_detected_ = captive_portal_detected_ || |
699 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL); | 699 (results->result == captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL); |
700 // Also keep track of non-HTTP portals and error cases. | 700 // Also keep track of non-HTTP portals and error cases. |
701 captive_portal_no_response_ = captive_portal_no_response_ || | 701 captive_portal_no_response_ = captive_portal_no_response_ || |
702 (results->result == captive_portal::RESULT_NO_RESPONSE); | 702 (results->result == captive_portal::RESULT_NO_RESPONSE); |
703 } | 703 } |
704 #endif | 704 #endif |
705 } | 705 } |
OLD | NEW |