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

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

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Minor changes from nasko@'s comments Created 3 years, 10 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 | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | 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 30cc8989e92062def7bacd32f14c6e30c5107a27..7f31e22fa383b7747c1922ba721b11fb5c084499 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3555,6 +3555,10 @@ void WebContentsImpl::OnDidLoadResourceFromMemoryCache(
void WebContentsImpl::OnDidDisplayInsecureContent(RenderFrameHostImpl* source) {
// Any frame can trigger display of insecure content, so we don't check
// |source| here.
+ DidDisplayInsecureContent();
+}
+
+void WebContentsImpl::DidDisplayInsecureContent() {
controller_.ssl_manager()->DidDisplayMixedContent();
}
@@ -3564,6 +3568,11 @@ void WebContentsImpl::OnDidRunInsecureContent(RenderFrameHostImpl* source,
// TODO(nick, estark): Should we call FilterURL using |source|'s process on
// these parameters? |target_url| seems unused, except for a log message. And
// |security_origin| might be replaceable with the origin of the main frame.
+ DidRunInsecureContent(security_origin, target_url);
+}
+
+void WebContentsImpl::DidRunInsecureContent(const GURL& security_origin,
+ const GURL& target_url) {
LOG(WARNING) << security_origin << " ran insecure content from "
<< target_url.possibly_invalid_spec();
RecordAction(base::UserMetricsAction("SSL.RanInsecureContent"));
@@ -3573,6 +3582,19 @@ void WebContentsImpl::OnDidRunInsecureContent(RenderFrameHostImpl* source,
controller_.ssl_manager()->DidRunMixedContent(security_origin);
}
+void WebContentsImpl::PassiveInsecureContentFound(const GURL& resource_url) {
+ GetDelegate()->PassiveInsecureContentFound(resource_url);
+}
+
+bool WebContentsImpl::ShouldAllowRunningInsecureContent(
+ WebContents* web_contents,
+ bool allowed_per_prefs,
+ const url::Origin& origin,
+ const GURL& resource_url) {
+ return GetDelegate()->ShouldAllowRunningInsecureContent(
+ web_contents, allowed_per_prefs, origin, resource_url);
+}
+
void WebContentsImpl::OnDidDisplayContentWithCertificateErrors(
RenderFrameHostImpl* source,
const GURL& url) {
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698