Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 600153004: Refactor SafeBrowsing and SSL interstitials to have a type variable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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");
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/security_warnings/ssl.js ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698