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

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

Issue 1415923015: Downgrade lock icon for broken-HTTPS subresources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove console message; see comment to mike Created 5 years, 1 month 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
« no previous file with comments | « content/browser/ssl/ssl_policy.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/ssl/ssl_policy.cc
diff --git a/content/browser/ssl/ssl_policy.cc b/content/browser/ssl/ssl_policy.cc
index dab2a5aa1ecd98f5627175d19dc0cfa6fe705301..e00a4211257d206bb79aafbfb1e64f761802ceb3 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 std::string& security_origin) {
+ const GURL& security_origin) {
if (!entry)
return;
@@ -113,20 +113,16 @@ void SSLPolicy::DidRunInsecureContent(NavigationEntryImpl* entry,
if (!site_instance)
return;
- backend_->HostRanInsecureContent(GURL(security_origin).host(),
+ backend_->HostRanInsecureContent(security_origin.host(),
site_instance->GetProcess()->GetID());
}
void SSLPolicy::OnRequestStarted(SSLRequestInfo* info) {
- // 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
+ 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
// 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.
« no previous file with comments | « content/browser/ssl/ssl_policy.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698