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

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

Issue 537983002: Mixed Content: introduce WebURLRequest::RequestContext checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 3 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/ImageLoader.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 17e3b975ce2128714ef4d25f8e92aeaef4bd2cc3..14330f6645182ad391c91243bb411eb5db82668e 100644
--- a/Source/core/loader/MixedContentChecker.h
+++ b/Source/core/loader/MixedContentChecker.h
@@ -31,6 +31,7 @@
#ifndef MixedContentChecker_h
#define MixedContentChecker_h
+#include "public/platform/WebURLRequest.h"
#include "wtf/text/WTFString.h"
namespace blink {
@@ -39,11 +40,14 @@ class LocalFrame;
class FrameLoaderClient;
class KURL;
class SecurityOrigin;
+class ResourceRequest;
class MixedContentChecker {
WTF_MAKE_NONCOPYABLE(MixedContentChecker);
public:
- MixedContentChecker(LocalFrame*);
+ explicit MixedContentChecker(LocalFrame*);
+
+ static bool shouldBlockFetch(LocalFrame*, const ResourceRequest&, const KURL&);
bool canDisplayInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const
{
@@ -68,6 +72,15 @@ private:
Submission
};
+ enum ContextType {
+ ContextTypeBlockable,
+ ContextTypeOptionallyBlockable,
+ ContextTypeShouldBeBlockable,
+ ContextTypeBlockableUnlessLax
+ };
+
+ static ContextType contextTypeFromContext(WebURLRequest::RequestContext);
+
// FIXME: This should probably have a separate client from FrameLoader.
FrameLoaderClient* client() const;
« no previous file with comments | « Source/core/loader/ImageLoader.cpp ('k') | Source/core/loader/MixedContentChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698