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

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

Issue 311033003: Implementing mixed content for forms posting to insecure location from secure ones (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed the error when action attribute is empty. Created 6 years, 6 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/FormSubmission.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 b4eb49a7585b5678ddcab791421c72a1f848fd1f..e749b679e60fa262a7aa86fec1c397da4e6ec4fd 100644
--- a/Source/core/loader/MixedContentChecker.h
+++ b/Source/core/loader/MixedContentChecker.h
@@ -45,24 +45,41 @@ class MixedContentChecker {
public:
MixedContentChecker(LocalFrame*);
- bool canDisplayInsecureContent(SecurityOrigin*, const KURL&) const;
+ bool canDisplayInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const
+ {
+ return canDisplayInsecureContentInternal(securityOrigin, url, MixedContentChecker::Display);
+ }
+ bool canSubmitToInsecureForm(SecurityOrigin* securityOrigin, const KURL& url) const
+ {
+ return canDisplayInsecureContentInternal(securityOrigin, url, MixedContentChecker::Submission);
+ }
+
bool canRunInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const
{
- return canRunInsecureContentInternal(securityOrigin, url, false);
+ return canRunInsecureContentInternal(securityOrigin, url, MixedContentChecker::Execution);
}
bool canConnectInsecureWebSocket(SecurityOrigin* securityOrigin, const KURL& url) const
{
- return canRunInsecureContentInternal(securityOrigin, url, true);
+ return canRunInsecureContentInternal(securityOrigin, url, MixedContentChecker::WebSocket);
}
static bool isMixedContent(SecurityOrigin*, const KURL&);
private:
+ enum MixedContentType {
+ Display,
+ Execution,
+ WebSocket,
+ Submission
+ };
+
// FIXME: This should probably have a separate client from FrameLoader.
FrameLoaderClient* client() const;
- bool canRunInsecureContentInternal(SecurityOrigin*, const KURL&, bool isWebSocket) const;
+ bool canDisplayInsecureContentInternal(SecurityOrigin*, const KURL&, const MixedContentType) const;
+
+ bool canRunInsecureContentInternal(SecurityOrigin*, const KURL&, const MixedContentType) const;
- void logWarning(bool allowed, const String& action, const KURL&) const;
+ void logWarning(bool allowed, const KURL& i, const MixedContentType) const;
LocalFrame* m_frame;
};
« no previous file with comments | « Source/core/loader/FormSubmission.cpp ('k') | Source/core/loader/MixedContentChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698