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

Unified Diff: Source/modules/websockets/NewWebSocketChannelImpl.cpp

Issue 348853009: Refactor mixed content checks against the top frame into MixedContentChecker. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WSS. 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
Index: Source/modules/websockets/NewWebSocketChannelImpl.cpp
diff --git a/Source/modules/websockets/NewWebSocketChannelImpl.cpp b/Source/modules/websockets/NewWebSocketChannelImpl.cpp
index a03e4b03da72ad1be0d6c01a38b8b19ba90a457c..53cd59b044667e434acfafe384525ad5d9589ebf 100644
--- a/Source/modules/websockets/NewWebSocketChannelImpl.cpp
+++ b/Source/modules/websockets/NewWebSocketChannelImpl.cpp
@@ -137,9 +137,6 @@ bool NewWebSocketChannelImpl::connect(const KURL& url, const String& protocol)
if (executionContext()->isDocument() && document()->frame()) {
if (!document()->frame()->loader().mixedContentChecker()->canConnectInsecureWebSocket(document()->securityOrigin(), url))
return false;
- Frame* top = document()->frame()->tree().top();
- if (top != document()->frame() && !toLocalFrame(top)->loader().mixedContentChecker()->canConnectInsecureWebSocket(toLocalFrame(top)->document()->securityOrigin(), url))
- return false;
}
if (MixedContentChecker::isMixedContent(document()->securityOrigin(), url)) {
String message = "Connecting to a non-secure WebSocket server from a secure origin is deprecated.";

Powered by Google App Engine
This is Rietveld 408576698