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

Unified Diff: Source/core/loader/FrameFetchContext.cpp

Issue 1299493003: Attach mixed content status to resource requests when sent to devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: change to MixedContentChecker::contextTypeForInspector() Created 5 years, 4 months 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: Source/core/loader/FrameFetchContext.cpp
diff --git a/Source/core/loader/FrameFetchContext.cpp b/Source/core/loader/FrameFetchContext.cpp
index 9777c19c71ef2d4d4099050f06e3b73fcdb770ba..2caa1687db4f7aa700e18fceb5b032baf926dd7d 100644
--- a/Source/core/loader/FrameFetchContext.cpp
+++ b/Source/core/loader/FrameFetchContext.cpp
@@ -496,21 +496,9 @@ bool FrameFetchContext::canRequest(Resource::Type type, const ResourceRequest& r
// Last of all, check for mixed content. We do this last so that when
// folks block mixed content with a CSP policy, they don't get a warning.
// They'll still get a warning in the console about CSP blocking the load.
-
- // If we're loading the main resource of a subframe, ensure that we check
- // against the parent of the active frame, rather than the frame itself.
- LocalFrame* effectiveFrame = frame();
- if (resourceRequest.frameType() == WebURLRequest::FrameTypeNested) {
- // FIXME: Deal with RemoteFrames.
- Frame* parentFrame = effectiveFrame->tree().parent();
- ASSERT(parentFrame);
- if (parentFrame->isLocalFrame())
- effectiveFrame = toLocalFrame(parentFrame);
- }
-
MixedContentChecker::ReportingStatus mixedContentReporting = forPreload ?
MixedContentChecker::SuppressReport : MixedContentChecker::SendReport;
- return !MixedContentChecker::shouldBlockFetch(effectiveFrame, resourceRequest, url, mixedContentReporting);
+ return !MixedContentChecker::shouldBlockFetch(MixedContentChecker::effectiveFrameForFrameType(frame(), resourceRequest.frameType()), resourceRequest, url, mixedContentReporting);
}
bool FrameFetchContext::isControlledByServiceWorker() const

Powered by Google App Engine
This is Rietveld 408576698