| 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 // Implementation of the SafeBrowsingBlockingPage class. | 5 // Implementation of the SafeBrowsingBlockingPage class. |
| 6 | 6 |
| 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 | 887 |
| 888 if (interstitial_type_ == TYPE_PHISHING) | 888 if (interstitial_type_ == TYPE_PHISHING) |
| 889 PopulatePhishingLoadTimeData(&load_time_data); | 889 PopulatePhishingLoadTimeData(&load_time_data); |
| 890 else | 890 else |
| 891 PopulateMalwareLoadTimeData(&load_time_data); | 891 PopulateMalwareLoadTimeData(&load_time_data); |
| 892 | 892 |
| 893 interstitial_show_time_ = base::TimeTicks::Now(); | 893 interstitial_show_time_ = base::TimeTicks::Now(); |
| 894 | 894 |
| 895 base::StringPiece html( | 895 base::StringPiece html( |
| 896 ResourceBundle::GetSharedInstance().GetRawDataResource( | 896 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 897 IRD_SSL_INTERSTITIAL_V2_HTML)); | 897 IRD_SECURITY_INTERSTITIAL_HTML)); |
| 898 webui::UseVersion2 version; | 898 webui::UseVersion2 version; |
| 899 return webui::GetI18nTemplateHtml(html, &load_time_data); | 899 return webui::GetI18nTemplateHtml(html, &load_time_data); |
| 900 } | 900 } |
| 901 | 901 |
| 902 void SafeBrowsingBlockingPage::PopulateMalwareLoadTimeData( | 902 void SafeBrowsingBlockingPage::PopulateMalwareLoadTimeData( |
| 903 base::DictionaryValue* load_time_data) { | 903 base::DictionaryValue* load_time_data) { |
| 904 load_time_data->SetBoolean("phishing", false); | 904 load_time_data->SetBoolean("phishing", false); |
| 905 load_time_data->SetString( | 905 load_time_data->SetString( |
| 906 "heading", l10n_util::GetStringUTF16(IDS_MALWARE_V3_HEADING)); | 906 "heading", l10n_util::GetStringUTF16(IDS_MALWARE_V3_HEADING)); |
| 907 load_time_data->SetString( | 907 load_time_data->SetString( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 IDS_PHISHING_V3_PRIMARY_PARAGRAPH, | 960 IDS_PHISHING_V3_PRIMARY_PARAGRAPH, |
| 961 base::UTF8ToUTF16(url_.host()))); | 961 base::UTF8ToUTF16(url_.host()))); |
| 962 load_time_data->SetString( | 962 load_time_data->SetString( |
| 963 "explanationParagraph", | 963 "explanationParagraph", |
| 964 l10n_util::GetStringFUTF16(IDS_PHISHING_V3_EXPLANATION_PARAGRAPH, | 964 l10n_util::GetStringFUTF16(IDS_PHISHING_V3_EXPLANATION_PARAGRAPH, |
| 965 base::UTF8ToUTF16(url_.host()))); | 965 base::UTF8ToUTF16(url_.host()))); |
| 966 load_time_data->SetString( | 966 load_time_data->SetString( |
| 967 "finalParagraph", | 967 "finalParagraph", |
| 968 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); | 968 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); |
| 969 } | 969 } |
| OLD | NEW |