| 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 51dfb21fc44a42e3c0a98e64b2da0780c1ed4dd3..d36172f5edefea929dd3782a8b803eb300a4f329 100644
|
| --- a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
|
| @@ -294,6 +294,13 @@ bool MixedContentChecker::shouldBlockFetch(
|
| ResourceRequest::RedirectStatus redirectStatus,
|
| const KURL& url,
|
| MixedContentChecker::ReportingStatus reportingStatus) {
|
| + // Frame-level loads are checked by the browser if PlzNavigate is enabled. No
|
| + // need to check them again here.
|
| + if (frame->settings()->getBrowserSideNavigationEnabled() &&
|
| + frameType != WebURLRequest::FrameTypeNone) {
|
| + return false;
|
| + }
|
| +
|
| Frame* effectiveFrame = effectiveFrameForFrameType(frame, frameType);
|
| Frame* mixedFrame =
|
| inWhichFrameIsContentMixed(effectiveFrame, frameType, url);
|
| @@ -563,6 +570,26 @@ void MixedContentChecker::handleCertificateError(
|
| }
|
| }
|
|
|
| +// static
|
| +void MixedContentChecker::mixedContentFoundByTheBrowser(
|
| + LocalFrame* frame,
|
| + const KURL& mainResourceUrl,
|
| + const KURL& mixedContentUrl,
|
| + WebURLRequest::RequestContext requestContext,
|
| + bool wasAllowed,
|
| + bool hadRedirect) {
|
| + logToConsoleAboutFetch(frame, mainResourceUrl, mixedContentUrl,
|
| + requestContext, wasAllowed);
|
| + ContentSecurityPolicy* policy =
|
| + frame->securityContext()->contentSecurityPolicy();
|
| + if (policy) {
|
| + policy->reportMixedContent(
|
| + mixedContentUrl, hadRedirect
|
| + ? ResourceRequest::RedirectStatus::FollowedRedirect
|
| + : ResourceRequest::RedirectStatus::NoRedirect);
|
| + }
|
| +}
|
| +
|
| WebMixedContentContextType MixedContentChecker::contextTypeForInspector(
|
| LocalFrame* frame,
|
| const ResourceRequest& request) {
|
|
|