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

Unified Diff: Source/core/loader/MixedContentChecker.h

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: 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/MixedContentChecker.h
diff --git a/Source/core/loader/MixedContentChecker.h b/Source/core/loader/MixedContentChecker.h
index f324a02ace2c06d4f5cdcca051ec72338ac63311..cf45a94d2b672f2b4ac699f60d03638190dd05ce 100644
--- a/Source/core/loader/MixedContentChecker.h
+++ b/Source/core/loader/MixedContentChecker.h
@@ -49,10 +49,22 @@ class CORE_EXPORT MixedContentChecker final {
DISALLOW_ALLOCATION();
public:
enum ReportingStatus { SendReport, SuppressReport };
- static bool shouldBlockFetch(LocalFrame*, WebURLRequest::RequestContext, WebURLRequest::FrameType, const KURL&, ReportingStatus = SendReport);
- static bool shouldBlockFetch(LocalFrame* frame, const ResourceRequest& request, const KURL& url, ReportingStatus status = SendReport)
+
+ // Checks if the given request should be blocked due to mixed
+ // content restrictions. Returns true if it should be blocked and
+ // false if it should be allowed. Mutates |request| to set
+ // |request->mixedContentStatus()| indicating which type of mixed
+ // content it is.
+ static bool shouldBlockFetch(LocalFrame*, ResourceRequest*, WebURLRequest::RequestContext, WebURLRequest::FrameType, const KURL&, ReportingStatus = SendReport);
Mike West 2015/08/17 15:36:45 You can probably make this variant private, as I t
estark 2015/08/17 17:20:12 Done.
+
+ static bool shouldBlockFetch(LocalFrame* frame, WebURLRequest::RequestContext context, WebURLRequest::FrameType frameType, const KURL& url, ReportingStatus status = SendReport)
+ {
+ return shouldBlockFetch(frame, nullptr, context, frameType, url, status);
+ }
+
+ static bool shouldBlockFetch(LocalFrame* frame, ResourceRequest* request, const KURL& url, ReportingStatus status = SendReport)
{
- return shouldBlockFetch(frame, request.requestContext(), request.frameType(), url, status);
+ return shouldBlockFetch(frame, request, request->requestContext(), request->frameType(), url, status);
}
static bool shouldBlockWebSocket(LocalFrame*, const KURL&, ReportingStatus = SendReport);

Powered by Google App Engine
This is Rietveld 408576698