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

Unified Diff: content/browser/renderer_host/p2p/socket_host_tcp.cc

Issue 10917167: Refactor the P2PSocketDispatcher to be created on the RenderThread instead of the RenderView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 3 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/browser/renderer_host/p2p/socket_host_tcp.cc
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
index 4a4b60592b40b29bfb412a46b751642910eaa252..3f0d5252e481075c60a6cb65e6195e94eb4fc7a6 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
@@ -18,9 +18,8 @@ const int kPacketHeaderSize = sizeof(uint16);
namespace content {
-P2PSocketHostTcp::P2PSocketHostTcp(IPC::Sender* message_sender,
- int routing_id, int id)
- : P2PSocketHost(message_sender, routing_id, id),
+P2PSocketHostTcp::P2PSocketHostTcp(IPC::Sender* message_sender, int id)
+ : P2PSocketHost(message_sender, id),
connected_(false) {
}
@@ -72,7 +71,7 @@ void P2PSocketHostTcp::OnError() {
if (state_ == STATE_UNINITIALIZED || state_ == STATE_CONNECTING ||
state_ == STATE_OPEN) {
- message_sender_->Send(new P2PMsg_OnError(routing_id_, id_));
+ message_sender_->Send(new P2PMsg_OnError(id_));
}
state_ = STATE_ERROR;
@@ -102,7 +101,7 @@ void P2PSocketHostTcp::OnConnected(int result) {
VLOG(1) << "Local address: " << address.ToString();
state_ = STATE_OPEN;
- message_sender_->Send(new P2PMsg_OnSocketCreated(routing_id_, id_, address));
+ message_sender_->Send(new P2PMsg_OnSocketCreated(id_, address));
DoRead();
}
@@ -150,8 +149,7 @@ void P2PSocketHostTcp::OnPacket(std::vector<char>& data) {
}
}
- message_sender_->Send(new P2PMsg_OnDataReceived(routing_id_, id_,
- remote_address_, data));
+ message_sender_->Send(new P2PMsg_OnDataReceived(id_, remote_address_, data));
}
void P2PSocketHostTcp::DidCompleteRead(int result) {
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host_tcp.h ('k') | content/browser/renderer_host/p2p/socket_host_tcp_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698