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

Unified Diff: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp

Issue 2003253002: [Devtools] Allow User-Agent header override for Websockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests Created 4 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: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
diff --git a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
index f329365ef5bfa4d2ad301a3088537b0f48065cb6..8d4c7b984dd48acb7ab3ee111d38e76bf13ac9d3 100644
--- a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
@@ -184,8 +184,7 @@ bool DocumentWebSocketChannel::connect(const KURL& url, const String& protocol)
if (document()->frame())
document()->frame()->loader().client()->dispatchWillOpenWebSocket(m_handle.get());
- m_handle->connect(url, webProtocols, WebSecurityOrigin(getExecutionContext()->getSecurityOrigin()), this);
-
+ m_handle->connect(url, webProtocols, WebSecurityOrigin(getExecutionContext()->getSecurityOrigin()), document()->userAgent(), this);
flowControlIfNecessary();
TRACE_EVENT_INSTANT1("devtools.timeline", "WebSocketCreate", TRACE_EVENT_SCOPE_THREAD, "data", InspectorWebSocketCreateEvent::data(document(), m_identifier, url, protocol));
InspectorInstrumentation::didCreateWebSocket(document(), m_identifier, url, protocol);

Powered by Google App Engine
This is Rietveld 408576698