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

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: add contextTypeForInspector() unit test 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
« no previous file with comments | « Source/core/loader/FrameFetchContext.cpp ('k') | Source/core/loader/MixedContentChecker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/MixedContentChecker.h
diff --git a/Source/core/loader/MixedContentChecker.h b/Source/core/loader/MixedContentChecker.h
index f324a02ace2c06d4f5cdcca051ec72338ac63311..89d79789f893654120ffbb4038c337d0fbf9585a 100644
--- a/Source/core/loader/MixedContentChecker.h
+++ b/Source/core/loader/MixedContentChecker.h
@@ -48,6 +48,13 @@ class CORE_EXPORT MixedContentChecker final {
WTF_MAKE_NONCOPYABLE(MixedContentChecker);
DISALLOW_ALLOCATION();
public:
+ enum ContextType {
+ ContextTypeNotMixedContent,
+ ContextTypeBlockable,
+ ContextTypeOptionallyBlockable,
+ ContextTypeShouldBeBlockable,
+ };
+
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)
@@ -62,6 +69,12 @@ public:
static void checkMixedPrivatePublic(LocalFrame*, const AtomicString& resourceIPAddress);
+ static ContextType contextTypeForInspector(LocalFrame*, const ResourceRequest&);
+
+ // Returns the frame that should be considered the effective frame
+ // for a mixed content check for the given frame type.
+ static LocalFrame* effectiveFrameForFrameType(LocalFrame*, WebURLRequest::FrameType);
+
private:
enum MixedContentType {
Display,
@@ -70,12 +83,6 @@ private:
Submission
};
- enum ContextType {
- ContextTypeBlockable,
- ContextTypeOptionallyBlockable,
- ContextTypeShouldBeBlockable,
- };
-
static LocalFrame* inWhichFrameIsContentMixed(LocalFrame*, WebURLRequest::FrameType, const KURL&);
static ContextType contextTypeFromContext(WebURLRequest::RequestContext, LocalFrame*);
« no previous file with comments | « Source/core/loader/FrameFetchContext.cpp ('k') | Source/core/loader/MixedContentChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698