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

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 unnecessary includes 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..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());

Powered by Google App Engine
This is Rietveld 408576698