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

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: remove console message; see comment to mike 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..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());

Powered by Google App Engine
This is Rietveld 408576698