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

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

Issue 356843006: Add "lax mixed content checking" runtime flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test. 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/MixedContentChecker.h ('k') | Source/core/testing/InternalSettings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/MixedContentChecker.cpp
diff --git a/Source/core/loader/MixedContentChecker.cpp b/Source/core/loader/MixedContentChecker.cpp
index 75e9737cd51391e37494c5be4b2107897335b82e..ea95015d1ed244d8e5e552adb375226b0c076c28 100644
--- a/Source/core/loader/MixedContentChecker.cpp
+++ b/Source/core/loader/MixedContentChecker.cpp
@@ -34,6 +34,7 @@
#include "core/frame/Settings.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "wtf/text/StringBuilder.h"
@@ -90,6 +91,13 @@ bool MixedContentChecker::canRunInsecureContentInternal(SecurityOrigin* security
return allowed;
}
+bool MixedContentChecker::canConnectInsecureWebSocket(SecurityOrigin* securityOrigin, const KURL& url) const
+{
+ if (RuntimeEnabledFeatures::laxMixedContentCheckingEnabled())
+ return canDisplayInsecureContentInternal(securityOrigin, url, MixedContentChecker::WebSocket);
+ return canRunInsecureContentInternal(securityOrigin, url, MixedContentChecker::WebSocket);
+}
+
void MixedContentChecker::logWarning(bool allowed, const KURL& target, const MixedContentType type) const
{
StringBuilder message;
« no previous file with comments | « Source/core/loader/MixedContentChecker.h ('k') | Source/core/testing/InternalSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698