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

Unified Diff: content/browser/ssl/ssl_policy.cc

Issue 1332633002: Add constructor to create SSLStatus from SSLInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp: debug logging for mac/win test failure Created 5 years, 3 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
Index: content/browser/ssl/ssl_policy.cc
diff --git a/content/browser/ssl/ssl_policy.cc b/content/browser/ssl/ssl_policy.cc
index cb8e4d734467c099a6deef5d12f71438311e165b..dab2a5aa1ecd98f5627175d19dc0cfa6fe705301 100644
--- a/content/browser/ssl/ssl_policy.cc
+++ b/content/browser/ssl/ssl_policy.cc
@@ -176,18 +176,20 @@ void SSLPolicy::UpdateEntry(NavigationEntryImpl* entry,
}
// Static
-SecurityStyle SSLPolicy::GetSecurityStyleForResource(const GURL& url,
- const SSLStatus& ssl) {
+SecurityStyle SSLPolicy::GetSecurityStyleForResource(
+ const GURL& url,
+ int cert_id,
+ net::CertStatus cert_status) {
meacer 2015/09/09 18:26:07 Seems like these can fit in a single line? ("Minim
estark 2015/09/10 14:32:05 'git cl format' seems to like it this way. (They d
// An HTTPS response may not have a certificate for some reason. When that
// happens, use the unauthenticated (HTTP) rather than the authentication
// broken security style so that we can detect this error condition.
- if (!url.SchemeIsCryptographic() || !ssl.cert_id)
+ if (!url.SchemeIsCryptographic() || !cert_id)
return SECURITY_STYLE_UNAUTHENTICATED;
// Minor errors don't lower the security style to
// SECURITY_STYLE_AUTHENTICATION_BROKEN.
- if (net::IsCertStatusError(ssl.cert_status) &&
- !net::IsCertStatusMinorError(ssl.cert_status)) {
+ if (net::IsCertStatusError(cert_status) &&
+ !net::IsCertStatusMinorError(cert_status)) {
return SECURITY_STYLE_AUTHENTICATION_BROKEN;
}
@@ -261,8 +263,8 @@ void SSLPolicy::InitializeEntryIfNeeded(NavigationEntryImpl* entry) {
if (entry->GetSSL().security_style != SECURITY_STYLE_UNKNOWN)
return;
- entry->GetSSL().security_style =
- GetSecurityStyleForResource(entry->GetURL(), entry->GetSSL());
+ entry->GetSSL().security_style = GetSecurityStyleForResource(
+ entry->GetURL(), entry->GetSSL().cert_id, entry->GetSSL().cert_status);
}
void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) {

Powered by Google App Engine
This is Rietveld 408576698