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

Unified Diff: chrome/browser/ssl/connection_security_helper.cc

Issue 1162663004: Introduce browser-side plumbing for sending the lock icon status to DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ssl/connection_security_helper.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/connection_security_helper.cc
diff --git a/chrome/browser/ssl/connection_security_helper.cc b/chrome/browser/ssl/connection_security_helper.cc
index 63455835bb614efb709850c2695e0c1a78d84b03..e55d1aca569cb60120471822d4cb328916b0c809 100644
--- a/chrome/browser/ssl/connection_security_helper.cc
+++ b/chrome/browser/ssl/connection_security_helper.cc
@@ -128,3 +128,24 @@ ConnectionSecurityHelper::GetSecurityLevelForWebContents(
return NONE;
}
}
+
+content::SecurityStyle ConnectionSecurityHelper::GetSecurityStyleForWebContents(
+ const content::WebContents* web_contents) {
+ SecurityLevel security_level = GetSecurityLevelForWebContents(web_contents);
+
+ switch (security_level) {
+ case NONE:
+ return content::SECURITY_STYLE_UNAUTHENTICATED;
+ case EV_SECURE:
+ case SECURE:
+ return content::SECURITY_STYLE_AUTHENTICATED;
+ case SECURITY_WARNING:
+ case SECURITY_POLICY_WARNING:
+ return content::SECURITY_STYLE_WARNING;
+ case SECURITY_ERROR:
+ return content::SECURITY_STYLE_AUTHENTICATION_BROKEN;
+ }
+
+ NOTREACHED();
+ return content::SECURITY_STYLE_UNKNOWN;
+}
« no previous file with comments | « chrome/browser/ssl/connection_security_helper.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698