Chromium Code Reviews| 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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 682 // Otherwise, check the threat type. | 682 // Otherwise, check the threat type. |
| 683 return unsafe_resources.size() == 1 && !unsafe_resources[0].is_subresource; | 683 return unsafe_resources.size() == 1 && !unsafe_resources[0].is_subresource; |
| 684 } | 684 } |
| 685 | 685 |
| 686 std::string SafeBrowsingBlockingPage::GetHTMLContents() { | 686 std::string SafeBrowsingBlockingPage::GetHTMLContents() { |
| 687 DCHECK(!unsafe_resources_.empty()); | 687 DCHECK(!unsafe_resources_.empty()); |
| 688 | 688 |
| 689 // Fill in the shared values. | 689 // Fill in the shared values. |
| 690 base::DictionaryValue load_time_data; | 690 base::DictionaryValue load_time_data; |
| 691 webui::SetFontAndTextDirection(&load_time_data); | 691 webui::SetFontAndTextDirection(&load_time_data); |
| 692 load_time_data.SetBoolean("ssl", false); | 692 load_time_data.SetString("type", "safeBrowsing"); |
|
mattm
2014/09/25 21:27:26
Lowercase s seems a little weird. Is there some st
meacer
2014/09/25 21:46:09
I wanted to follow the convention with other varia
mattm
2014/09/25 21:49:57
In that case, it seems more like it should follow
meacer
2014/09/25 21:58:33
Done, I assumed Safebrowsing is a single word.
| |
| 693 load_time_data.SetString( | 693 load_time_data.SetString( |
| 694 "tabTitle", l10n_util::GetStringUTF16(IDS_SAFEBROWSING_V3_TITLE)); | 694 "tabTitle", l10n_util::GetStringUTF16(IDS_SAFEBROWSING_V3_TITLE)); |
| 695 load_time_data.SetString( | 695 load_time_data.SetString( |
| 696 "openDetails", | 696 "openDetails", |
| 697 l10n_util::GetStringUTF16(IDS_SAFEBROWSING_V3_OPEN_DETAILS_BUTTON)); | 697 l10n_util::GetStringUTF16(IDS_SAFEBROWSING_V3_OPEN_DETAILS_BUTTON)); |
| 698 load_time_data.SetString( | 698 load_time_data.SetString( |
| 699 "closeDetails", | 699 "closeDetails", |
| 700 l10n_util::GetStringUTF16(IDS_SAFEBROWSING_V3_CLOSE_DETAILS_BUTTON)); | 700 l10n_util::GetStringUTF16(IDS_SAFEBROWSING_V3_CLOSE_DETAILS_BUTTON)); |
| 701 load_time_data.SetString( | 701 load_time_data.SetString( |
| 702 "primaryButtonText", | 702 "primaryButtonText", |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 811 IDS_PHISHING_V3_PRIMARY_PARAGRAPH, | 811 IDS_PHISHING_V3_PRIMARY_PARAGRAPH, |
| 812 base::UTF8ToUTF16(url_.host()))); | 812 base::UTF8ToUTF16(url_.host()))); |
| 813 load_time_data->SetString( | 813 load_time_data->SetString( |
| 814 "explanationParagraph", | 814 "explanationParagraph", |
| 815 l10n_util::GetStringFUTF16(IDS_PHISHING_V3_EXPLANATION_PARAGRAPH, | 815 l10n_util::GetStringFUTF16(IDS_PHISHING_V3_EXPLANATION_PARAGRAPH, |
| 816 base::UTF8ToUTF16(url_.host()))); | 816 base::UTF8ToUTF16(url_.host()))); |
| 817 load_time_data->SetString( | 817 load_time_data->SetString( |
| 818 "finalParagraph", | 818 "finalParagraph", |
| 819 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); | 819 l10n_util::GetStringUTF16(IDS_PHISHING_V3_PROCEED_PARAGRAPH)); |
| 820 } | 820 } |
| OLD | NEW |