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

Unified Diff: content/renderer/p2p/ipc_socket_factory.cc

Issue 45183002: Expose the p2p client in content/public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some renaming Created 7 years, 2 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/renderer/p2p/ipc_socket_factory.cc
diff --git a/content/renderer/p2p/ipc_socket_factory.cc b/content/renderer/p2p/ipc_socket_factory.cc
index bd8fb315c114c39ce81250a98512894654c82391..9b72859d76d089f4af9931cd8b44f92656ae47ad 100644
--- a/content/renderer/p2p/ipc_socket_factory.cc
+++ b/content/renderer/p2p/ipc_socket_factory.cc
@@ -62,8 +62,9 @@ class IpcPacketSocket : public talk_base::AsyncPacketSocket,
// P2PSocketClient::Delegate implementation.
virtual void OnOpen(const net::IPEndPoint& address) OVERRIDE;
- virtual void OnIncomingTcpConnection(const net::IPEndPoint& address,
- P2PSocketClient* client) OVERRIDE;
+ virtual void OnIncomingTcpConnection(
+ const net::IPEndPoint& address,
+ P2PSocketClient* client) OVERRIDE;
virtual void OnSendComplete() OVERRIDE;
virtual void OnError() OVERRIDE;
virtual void OnDataReceived(const net::IPEndPoint& address,
@@ -402,7 +403,8 @@ IpcPacketSocketFactory::~IpcPacketSocketFactory() {
talk_base::AsyncPacketSocket* IpcPacketSocketFactory::CreateUdpSocket(
const talk_base::SocketAddress& local_address, int min_port, int max_port) {
talk_base::SocketAddress crome_address;
- P2PSocketClient* socket_client = new P2PSocketClient(socket_dispatcher_);
+ P2PSocketClientImpl* socket_client =
+ new P2PSocketClientImpl(socket_dispatcher_);
scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
// TODO(sergeyu): Respect local_address and port limits here (need
// to pass them over IPC channel to the browser).
@@ -422,7 +424,8 @@ talk_base::AsyncPacketSocket* IpcPacketSocketFactory::CreateServerTcpSocket(
P2PSocketType type = (opts & talk_base::PacketSocketFactory::OPT_STUN) ?
P2P_SOCKET_STUN_TCP_SERVER : P2P_SOCKET_TCP_SERVER;
- P2PSocketClient* socket_client = new P2PSocketClient(socket_dispatcher_);
+ P2PSocketClientImpl* socket_client =
+ new P2PSocketClientImpl(socket_dispatcher_);
scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
if (!socket->Init(type, socket_client, local_address,
talk_base::SocketAddress())) {
@@ -447,10 +450,10 @@ talk_base::AsyncPacketSocket* IpcPacketSocketFactory::CreateClientTcpSocket(
type = (opts & talk_base::PacketSocketFactory::OPT_STUN) ?
P2P_SOCKET_STUN_TCP_CLIENT : P2P_SOCKET_TCP_CLIENT;
}
- P2PSocketClient* socket_client = new P2PSocketClient(socket_dispatcher_);
+ P2PSocketClientImpl* socket_client =
+ new P2PSocketClientImpl(socket_dispatcher_);
scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
- if (!socket->Init(type, socket_client, local_address,
- remote_address))
+ if (!socket->Init(type, socket_client, local_address, remote_address))
return NULL;
return socket.release();
}

Powered by Google App Engine
This is Rietveld 408576698