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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 181253003: Downgrade page security if an inline has invalid certificate. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated browser test & formatting fix. Created 6 years, 9 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
« no previous file with comments | « chrome/test/data/ssl/page_with_dynamic_insecure_content.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 195edc388d7e714b3c4772930b2b099f260654fa..af70e0f67e956e854d4cc0496b94c5cc3befda98 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1881,6 +1881,10 @@ void WebContentsImpl::DragSourceMovedTo(int client_x, int client_y,
void WebContentsImpl::DidGetResourceResponseStart(
const ResourceRequestDetails& details) {
+
+ if (net::IsCertStatusError(details.ssl_cert_status))
+ displayed_insecure_content_ = true;
Charlie Reis 2014/04/09 17:20:17 I think the main thing that confused me was that i
+
controller_.ssl_manager()->DidStartResourceResponse(details);
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
@@ -2272,6 +2276,9 @@ void WebContentsImpl::OnDidLoadResourceFromMemoryCache(
url, GetRenderProcessHost()->GetID(), cert_id, cert_status, http_method,
mime_type, resource_type);
+ if (net::IsCertStatusError(cert_status))
+ displayed_insecure_content_ = true;
+
controller_.ssl_manager()->DidLoadFromMemoryCache(details);
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
« no previous file with comments | « chrome/test/data/ssl/page_with_dynamic_insecure_content.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698