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

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

Issue 1415923015: Downgrade lock icon for broken-HTTPS subresources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add MixedContentChecker unit test Created 5 years, 1 month 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 fdcc09b14a13bba18e331b1fa85bb1848942e2f5..82c9a49a0cf1377fa67172cd63514be9733420f8 100644
--- a/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
+++ b/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
@@ -458,6 +458,24 @@ 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)
+{
+ if (frameType == WebURLRequest::FrameTypeTopLevel || !frame)
+ return;
+
+ FrameLoaderClient* client = frame->loader().client();
+ ContextType contextType = MixedContentChecker::contextTypeFromContext(requestContext, frame);
+ if (contextType == ContextTypeBlockable) {
+ client->didRunContentWithCertificateErrors(url, securityInfo, frame->document()->url(), frame->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(url, securityInfo, frame->document()->url(), frame->loader().documentLoader()->response().getSecurityInfo());
+ }
Mike West 2015/11/27 05:30:38 Should we output a console message noting the resp
estark 2015/11/28 02:46:56 Done. I think we should keep the console messages
estark 2015/11/30 18:13:27 Mike: Oops, this turned out to be more complicated
+}
+
MixedContentChecker::ContextType MixedContentChecker::contextTypeForInspector(LocalFrame* frame, const ResourceRequest& request)
{
LocalFrame* effectiveFrame = effectiveFrameForFrameType(frame, request.frameType());

Powered by Google App Engine
This is Rietveld 408576698