| Index: chrome/browser/android/policy/policy_auditor.cc
|
| diff --git a/chrome/browser/android/policy/policy_auditor.cc b/chrome/browser/android/policy/policy_auditor.cc
|
| index dda42e595a4b4ffd6c15a14fd9e204548934cd71..2b1d69a59629424056fa6714276a52700e871937 100644
|
| --- a/chrome/browser/android/policy/policy_auditor.cc
|
| +++ b/chrome/browser/android/policy/policy_auditor.cc
|
| @@ -39,30 +39,27 @@ int GetCertificateFailure(JNIEnv* env,
|
| return NONE;
|
|
|
| const content::SSLStatus& ssl = entry->GetSSL();
|
| - switch (ssl.security_style) {
|
| - case content::SECURITY_STYLE_WARNING:
|
| - case content::SECURITY_STYLE_UNKNOWN:
|
| - case content::SECURITY_STYLE_UNAUTHENTICATED:
|
| - return NONE;
|
| -
|
| - case content::SECURITY_STYLE_AUTHENTICATION_BROKEN:
|
| - case content::SECURITY_STYLE_AUTHENTICATED: {
|
| - if (net::IsCertStatusError(ssl.cert_status)) {
|
| - if (ssl.cert_status & net::CERT_STATUS_AUTHORITY_INVALID)
|
| - return CERTIFICATE_FAIL_UNTRUSTED;
|
| - if (ssl.cert_status & net::CERT_STATUS_REVOKED)
|
| - return CERTIFICATE_FAIL_REVOKED;
|
| - // No mapping for CERTIFICATE_FAIL_NOT_YET_VALID.
|
| - if (ssl.cert_status & net::CERT_STATUS_DATE_INVALID)
|
| - return CERTIFICATE_FAIL_EXPIRED;
|
| - if (ssl.cert_status & net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION)
|
| - return CERTIFICATE_FAIL_UNABLE_TO_CHECK_REVOCATION_STATUS;
|
| - return CERTIFICATE_FAIL_UNSPECIFIED;
|
| + if (ssl.certificate && entry->GetURL().SchemeIsCryptographic()) {
|
| + if (net::IsCertStatusError(ssl.cert_status)) {
|
| + if (ssl.cert_status & net::CERT_STATUS_AUTHORITY_INVALID) {
|
| + return CERTIFICATE_FAIL_UNTRUSTED;
|
| + }
|
| + if (ssl.cert_status & net::CERT_STATUS_REVOKED) {
|
| + return CERTIFICATE_FAIL_REVOKED;
|
| }
|
| - if (ssl.content_status &
|
| - content::SSLStatus::DISPLAYED_INSECURE_CONTENT) {
|
| - return CERTIFICATE_FAIL_UNSPECIFIED;
|
| + // No mapping for CERTIFICATE_FAIL_NOT_YET_VALID.
|
| + if (ssl.cert_status & net::CERT_STATUS_DATE_INVALID) {
|
| + return CERTIFICATE_FAIL_EXPIRED;
|
| }
|
| + if (ssl.cert_status & net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION) {
|
| + return CERTIFICATE_FAIL_UNABLE_TO_CHECK_REVOCATION_STATUS;
|
| + }
|
| + return CERTIFICATE_FAIL_UNSPECIFIED;
|
| + }
|
| + if (ssl.content_status & content::SSLStatus::DISPLAYED_INSECURE_CONTENT ||
|
| + ssl.content_status &
|
| + content::SSLStatus::DISPLAYED_CONTENT_WITH_CERT_ERRORS) {
|
| + return CERTIFICATE_FAIL_UNSPECIFIED;
|
| }
|
| }
|
| return NONE;
|
|
|