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 fdcc09b14a13bba18e331b1fa85bb1848942e2f5..f525cda65d194fc8b58b7064db36d29c3169001d 100644 |
--- a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp |
+++ b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp |
@@ -458,6 +458,27 @@ LocalFrame* MixedContentChecker::effectiveFrameForFrameType(LocalFrame* frame, W |
return effectiveFrame; |
} |
+void MixedContentChecker::handleCertificateError(LocalFrame* frame, const ResourceRequest& request, const ResourceResponse& response) |
+{ |
+ WebURLRequest::FrameType frameType = request.frameType(); |
+ LocalFrame* effectiveFrame = effectiveFrameForFrameType(frame, frameType); |
+ if (frameType == WebURLRequest::FrameTypeTopLevel || !effectiveFrame) |
+ return; |
+ |
+ FrameLoaderClient* client = effectiveFrame->loader().client(); |
+ WebURLRequest::RequestContext requestContext = request.requestContext(); |
+ ContextType contextType = MixedContentChecker::contextTypeFromContext(requestContext, frame); |
+ if (contextType == ContextTypeBlockable) { |
+ client->didRunContentWithCertificateErrors(response.url(), response.getSecurityInfo(), effectiveFrame->document()->url(), effectiveFrame->loader().documentLoader()->response().getSecurityInfo()); |
+ } else { |
+ // contextTypeFromContext() never returns NotMixedContent (it |
+ // computes the type of mixed content, given that the content is |
+ // mixed). |
+ ASSERT(contextType != ContextTypeNotMixedContent); |
+ client->didDisplayContentWithCertificateErrors(response.url(), response.getSecurityInfo(), effectiveFrame->document()->url(), effectiveFrame->loader().documentLoader()->response().getSecurityInfo()); |
+ } |
+} |
+ |
MixedContentChecker::ContextType MixedContentChecker::contextTypeForInspector(LocalFrame* frame, const ResourceRequest& request) |
{ |
LocalFrame* effectiveFrame = effectiveFrameForFrameType(frame, request.frameType()); |