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

Unified Diff: third_party/WebKit/Source/core/loader/MixedContentChecker.cpp

Issue 1550233002: Move mixed content settings histograms into browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo fix Created 4 years, 11 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
Index: third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
diff --git a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
index bd14f0347ba6fa0a13a50b967720175336ed5c09..f01788594efaabf87d8db98750fcba90a70c23fa 100644
--- a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
+++ b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
@@ -305,7 +305,7 @@ bool MixedContentChecker::shouldBlockFetch(LocalFrame* frame, WebURLRequest::Req
MixedContentChecker::count(mixedFrame, requestContext);
Settings* settings = mixedFrame->settings();
- FrameLoaderClient* client = mixedFrame->loader().client();
+ FrameLoaderClient* client = frame->loader().client();
SecurityOrigin* securityOrigin = mixedFrame->document()->securityOrigin();
bool allowed = false;
@@ -326,6 +326,8 @@ bool MixedContentChecker::shouldBlockFetch(LocalFrame* frame, WebURLRequest::Req
switch (contextType) {
case ContextTypeOptionallyBlockable:
+ if (!strictMode)
alexmos 2016/01/09 01:39:02 I know this preserves original behavior, but do yo
+ mixedFrame->client()->triedDisplayingInsecureContent(securityOrigin, url);
allowed = !strictMode && client->allowDisplayingInsecureContent(settings && settings->allowDisplayOfInsecureContent(), securityOrigin, url);
alexmos 2016/01/09 01:39:02 This could benefit from a comment somewhere explai
if (allowed)
client->didDisplayInsecureContent();
@@ -341,6 +343,8 @@ bool MixedContentChecker::shouldBlockFetch(LocalFrame* frame, WebURLRequest::Req
}
bool shouldAskEmbedder = !strictMode && settings && (!settings->strictlyBlockBlockableMixedContent() || settings->allowRunningOfInsecureContent());
+ if (shouldAskEmbedder)
+ mixedFrame->client()->triedRunningInsecureContent(securityOrigin, url);
allowed = shouldAskEmbedder && client->allowRunningInsecureContent(settings && settings->allowRunningOfInsecureContent(), securityOrigin, url);
if (allowed) {
client->didRunInsecureContent(securityOrigin, url);
@@ -395,6 +399,7 @@ bool MixedContentChecker::shouldBlockWebSocket(LocalFrame* frame, const KURL& ur
bool strictMode = mixedFrame->document()->shouldEnforceStrictMixedContentChecking() || settings->strictMixedContentChecking();
if (!strictMode) {
bool allowedPerSettings = settings && settings->allowRunningOfInsecureContent();
+ mixedFrame->client()->triedRunningInsecureContent(securityOrigin, url);
allowed = client->allowRunningInsecureContent(allowedPerSettings, securityOrigin, url);
}

Powered by Google App Engine
This is Rietveld 408576698