Chromium Code Reviews| 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); |