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..389b4b7926d5f8c2e722eb11e6d98a42144b0dca 100644 |
--- a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp |
+++ b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp |
@@ -458,6 +458,22 @@ LocalFrame* MixedContentChecker::effectiveFrameForFrameType(LocalFrame* frame, W |
return effectiveFrame; |
} |
+void MixedContentChecker::handleCertificateError(LocalFrame* frame, const KURL& url, WebURLRequest::RequestContext requestContext, WebURLRequest::FrameType frameType, const CString& securityInfo) |
jww
2015/11/20 01:25:08
Do we have any MixedContentChecker unit tests yet?
estark
2015/11/23 23:40:24
Acknowledged, but haven't done this yet. MixedCont
|
+{ |
+ if (frameType == WebURLRequest::FrameTypeTopLevel || !frame) |
jww
2015/11/20 01:25:08
How can we can !frame? Can this be an ASSERT?
estark
2015/11/23 23:40:24
I put this here because shouldBlockFetch() has a s
jww
2015/11/25 19:24:02
Hm, maybe Service Worker or something? Anyway, thi
|
+ return; |
+ |
+ FrameLoaderClient* client = frame->loader().client(); |
+ ContextType contextType = MixedContentChecker::contextTypeFromContext(requestContext, frame); |
+ if (contextType == ContextTypeBlockable) { |
+ SecurityOrigin* securityOrigin = frame->document()->securityOrigin(); |
+ client->didRunContentWithCertificateErrors(securityOrigin, url, securityInfo); |
+ } else { |
+ ASSERT(contextType != ContextTypeNotMixedContent); |
jww
2015/11/20 01:25:08
I guess this ASSERT exists because handleCertifica
estark
2015/11/23 23:40:24
Actually, it's because contextTypeFromContext() ne
|
+ client->didDisplayContentWithCertificateErrors(url, securityInfo); |
+ } |
+} |
+ |
MixedContentChecker::ContextType MixedContentChecker::contextTypeForInspector(LocalFrame* frame, const ResourceRequest& request) |
{ |
LocalFrame* effectiveFrame = effectiveFrameForFrameType(frame, request.frameType()); |