Index: content/browser/ssl/ssl_policy.cc |
diff --git a/content/browser/ssl/ssl_policy.cc b/content/browser/ssl/ssl_policy.cc |
index 06677dc25e932b1aaef38e6e3f1cf76cb6b63006..ed8d80b3499b38320712fbbb6c89e5d313db092a 100644 |
--- a/content/browser/ssl/ssl_policy.cc |
+++ b/content/browser/ssl/ssl_policy.cc |
@@ -105,7 +105,7 @@ void SSLPolicy::OnCertError(SSLCertErrorHandler* handler) { |
} |
void SSLPolicy::DidRunInsecureContent(NavigationEntryImpl* entry, |
- const GURL& security_origin) { |
+ const std::string& security_origin) { |
if (!entry) |
return; |
@@ -113,16 +113,20 @@ void SSLPolicy::DidRunInsecureContent(NavigationEntryImpl* entry, |
if (!site_instance) |
return; |
- backend_->HostRanInsecureContent(security_origin.host(), |
+ backend_->HostRanInsecureContent(GURL(security_origin).host(), |
site_instance->GetProcess()->GetID()); |
} |
void SSLPolicy::OnRequestStarted(SSLRequestInfo* info) { |
- if (info->ssl_cert_id() && info->url().SchemeIsCryptographic() && |
- !net::IsCertStatusError(info->ssl_cert_status())) { |
- // If the scheme is https: or wss: *and* the security info for the |
- // cert has been set (i.e. the cert id is not 0) and the cert did |
- // not have any errors, revoke any previous decisions that |
+ // TODO(abarth): This mechanism is wrong. What we should be doing is sending |
+ // this information back through WebKit and out some FrameLoaderClient |
+ // methods. |
+ |
+ if (net::IsCertStatusError(info->ssl_cert_status())) { |
+ backend_->HostRanInsecureContent(info->url().host(), info->child_id()); |
+ } else if (info->ssl_cert_id() && info->url().SchemeIsCryptographic()) { |
+ // If the scheme is https: or wss: *and* the security info for the cert has |
+ // been set (i.e. the cert id is not 0), revoke any previous decisions that |
// have occurred. If the cert info has not been set, do nothing since it |
// isn't known if the connection was actually a valid connection or if it |
// had a cert error. |