| Index: content/browser/ssl/ssl_policy.cc
|
| diff --git a/content/browser/ssl/ssl_policy.cc b/content/browser/ssl/ssl_policy.cc
|
| index a45e135d16c87e446221d4b35343abb796b75d01..b493a8d74abe3dc7d48fc1492643725f05c2c142 100644
|
| --- a/content/browser/ssl/ssl_policy.cc
|
| +++ b/content/browser/ssl/ssl_policy.cc
|
| @@ -117,6 +117,20 @@ void SSLPolicy::DidRunInsecureContent(NavigationEntryImpl* entry,
|
| site_instance->GetProcess()->GetID());
|
| }
|
|
|
| +void SSLPolicy::DidRunContentWithCertificateErrors(
|
| + NavigationEntryImpl* entry,
|
| + const GURL& security_origin) {
|
| + if (!entry)
|
| + return;
|
| +
|
| + SiteInstance* site_instance = entry->site_instance();
|
| + if (!site_instance)
|
| + return;
|
| +
|
| + backend_->HostRanContentWithCertificateErrors(
|
| + security_origin.host(), site_instance->GetProcess()->GetID());
|
| +}
|
| +
|
| void SSLPolicy::OnRequestStarted(const GURL& url,
|
| int cert_id,
|
| net::CertStatus cert_status) {
|
| @@ -156,6 +170,14 @@ void SSLPolicy::UpdateEntry(NavigationEntryImpl* entry,
|
| if (web_contents->DisplayedInsecureContent())
|
| entry->GetSSL().content_status |= SSLStatus::DISPLAYED_INSECURE_CONTENT;
|
|
|
| + if (!web_contents->DisplayedContentWithCertificateErrors())
|
| + entry->GetSSL().content_status &=
|
| + ~SSLStatus::DISPLAYED_CONTENT_WITH_CERTIFICATE_ERRORS;
|
| +
|
| + if (web_contents->DisplayedContentWithCertificateErrors())
|
| + entry->GetSSL().content_status |=
|
| + SSLStatus::DISPLAYED_CONTENT_WITH_CERTIFICATE_ERRORS;
|
| +
|
| if (entry->GetSSL().security_style == SECURITY_STYLE_AUTHENTICATION_BROKEN)
|
| return;
|
|
|
| @@ -163,12 +185,21 @@ void SSLPolicy::UpdateEntry(NavigationEntryImpl* entry,
|
| // Note that |site_instance| can be NULL here because NavigationEntries don't
|
| // necessarily have site instances. Without a process, the entry can't
|
| // possibly have insecure content. See bug http://crbug.com/12423.
|
| - if (site_instance &&
|
| - backend_->DidHostRunInsecureContent(
|
| + if (!site_instance)
|
| + return;
|
| +
|
| + if (backend_->DidHostRunInsecureContent(
|
| entry->GetURL().host(), site_instance->GetProcess()->GetID())) {
|
| entry->GetSSL().security_style =
|
| SECURITY_STYLE_AUTHENTICATION_BROKEN;
|
| entry->GetSSL().content_status |= SSLStatus::RAN_INSECURE_CONTENT;
|
| + }
|
| +
|
| + if (backend_->DidHostRunContentWithCertificateErrors(
|
| + entry->GetURL().host(), site_instance->GetProcess()->GetID())) {
|
| + entry->GetSSL().security_style = SECURITY_STYLE_AUTHENTICATION_BROKEN;
|
| + entry->GetSSL().content_status |=
|
| + SSLStatus::RAN_CONTENT_WITH_CERTIFICATE_ERRORS;
|
| return;
|
| }
|
| }
|
|
|