Chromium Code Reviews| 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..935acf52f08480b457cbd626518b55995f840cb3 100644 |
| --- a/chrome/browser/ssl/connection_security_helper.cc |
| +++ b/chrome/browser/ssl/connection_security_helper.cc |
| @@ -128,3 +128,23 @@ 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(); |
|
Ryan Sleevi
2015/06/03 23:43:52
nit: tend to prefer a newline between 147 & 148 fo
lgarron
2015/06/04 00:26:34
Done.
|
| + return content::SECURITY_STYLE_UNKNOWN; |
| +} |