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

Unified Diff: components/security_state/content/content_utils.cc

Issue 2542533004: Override DevTools security summary when a Safe Browsing warning shows. (Closed)
Patch Set: Address review feedback Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: components/security_state/content/content_utils.cc
diff --git a/components/security_state/content/content_utils.cc b/components/security_state/content/content_utils.cc
index 62b3a33d1a735f090ba261cb90fb55feb7eeb5dd..ec7b804210ea536175b5e8394df1a2ab80a619a9 100644
--- a/components/security_state/content/content_utils.cc
+++ b/components/security_state/content/content_utils.cc
@@ -211,6 +211,12 @@ blink::WebSecurityStyle GetSecurityStyle(
SecurityLevelToSecurityStyle(
security_state::kDisplayedInsecureContentLevel);
+ if (security_info.malicious_content_status !=
+ security_state::MALICIOUS_CONTENT_STATUS_NONE) {
+ security_style_explanations->summary =
+ l10n_util::GetStringUTF8(IDS_SAFEBROWSING_WARNING);
+ }
+
// Check if the page is HTTP; if so, no more explanations are needed. Note
// that SecurityStyleUnauthenticated does not necessarily mean that
// the page is loaded over HTTP, because the security style merely
« no previous file with comments | « chrome/browser/ssl/security_state_tab_helper_browser_tests.cc ('k') | components/security_state_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698