summaryrefslogtreecommitdiffstats
path: root/content/common/socket_stream_dispatcher.cc
diff options
context:
space:
mode:
authortoyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 15:39:34 +0000
committertoyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 15:39:34 +0000
commit5fa3a0695ffbad35741ce258dc20408485ca0911 (patch)
tree2efeeb5003c3f01e21d4b473e5af86793b3d1b8e /content/common/socket_stream_dispatcher.cc
parente2df9ef5dd3040914e09450d5b7f32983fd14ada (diff)
downloadchromium_src-5fa3a0695ffbad35741ce258dc20408485ca0911.zip
chromium_src-5fa3a0695ffbad35741ce258dc20408485ca0911.tar.gz
chromium_src-5fa3a0695ffbad35741ce258dc20408485ca0911.tar.bz2
Bind RenderViewImpl routing_id to SocketStreamHost
- Set RenderViewImpl's routing_id to WebSocketStresmHandleImpl via dispatchWillOpenSocketStream() - Send the id from WebSocketStreamHandleImpl to SocketStreamHost via IPC SocketStreamHostMsg_Connect This change aim that SocketStreamDispatcher uses SSLManager with routing_id to handle SSL errors. BUG=53836 TEST=none Review URL: http://codereview.chromium.org/9677031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127964 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/socket_stream_dispatcher.cc')
-rw-r--r--content/common/socket_stream_dispatcher.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/content/common/socket_stream_dispatcher.cc b/content/common/socket_stream_dispatcher.cc
index 640a15b..f573329 100644
--- a/content/common/socket_stream_dispatcher.cc
+++ b/content/common/socket_stream_dispatcher.cc
@@ -13,6 +13,7 @@
#include "base/message_loop.h"
#include "content/common/child_thread.h"
#include "content/common/socket_stream.h"
+#include "content/common/socket_stream_handle_data.h"
#include "content/common/socket_stream_messages.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/websocketstreamhandle_bridge.h"
@@ -146,8 +147,14 @@ void IPCWebSocketStreamHandleBridge::DoConnect(const GURL& url) {
socket_id_ = all_bridges.Get().Add(this);
DCHECK_NE(socket_id_, content::kNoSocketId);
+ int render_view_id = MSG_ROUTING_NONE;
+ const SocketStreamHandleData* data =
+ SocketStreamHandleData::ForHandle(handle_);
+ if (data)
+ render_view_id = data->render_view_id();
AddRef(); // Released in OnClosed().
- if (child_thread_->Send(new SocketStreamHostMsg_Connect(url, socket_id_))) {
+ if (child_thread_->Send(
+ new SocketStreamHostMsg_Connect(render_view_id, url, socket_id_))) {
DVLOG(1) << "Connect socket_id=" << socket_id_;
// TODO(ukai): timeout to OnConnected.
} else {