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

Unified Diff: content/common/socket_stream_dispatcher.cc

Issue 9677031: Bind RenderViewImpl routing_id to SocketStreamHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reflects review comments by tony and darin Created 8 years, 9 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: content/common/socket_stream_dispatcher.cc
diff --git a/content/common/socket_stream_dispatcher.cc b/content/common/socket_stream_dispatcher.cc
index 640a15b83dba608df5bc434012bfbf45a72cb1a6..291c51f6ce9e952c1605890c6ea4f8aee3b1c700 100644
--- a/content/common/socket_stream_dispatcher.cc
+++ b/content/common/socket_stream_dispatcher.cc
@@ -13,10 +13,12 @@
#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"
#include "webkit/glue/websocketstreamhandle_delegate.h"
+#include "webkit/glue/websocketstreamhandle_impl.h"
darin (slow to review) 2012/03/20 06:46:59 still needed?
Takashi Toyoshima 2012/03/20 18:19:40 No. This inclusion was removed at Patch Set 8.
// IPCWebSocketStreamHandleBridge is owned by each SocketStreamHandle.
// It communicates with the main browser process via SocketStreamDispatcher.
@@ -146,8 +148,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 {

Powered by Google App Engine
This is Rietveld 408576698