Chromium Code Reviews| 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); |
| } |