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

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

Issue 45183002: Expose the p2p client in content/public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (most) comments addressed Created 7 years, 1 month 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/socket_dispatcher.cc
diff --git a/content/renderer/p2p/socket_dispatcher.cc b/content/renderer/p2p/socket_dispatcher.cc
index e3a47a17e820880710899fe1d0551b07d44c8a1e..03c0356d0a0dd110bf34f733712944ebe55c9a0f 100644
--- a/content/renderer/p2p/socket_dispatcher.cc
+++ b/content/renderer/p2p/socket_dispatcher.cc
@@ -27,7 +27,7 @@ P2PSocketDispatcher::P2PSocketDispatcher(
P2PSocketDispatcher::~P2PSocketDispatcher() {
network_list_observers_->AssertEmpty();
- for (IDMap<P2PSocketClient>::iterator i(&clients_); !i.IsAtEnd();
+ for (IDMap<P2PSocketClientImpl>::iterator i(&clients_); !i.IsAtEnd();
i.Advance()) {
i.GetCurrentValue()->Detach();
}
@@ -88,7 +88,7 @@ base::MessageLoopProxy* P2PSocketDispatcher::message_loop() {
return message_loop_.get();
}
-int P2PSocketDispatcher::RegisterClient(P2PSocketClient* client) {
+int P2PSocketDispatcher::RegisterClient(P2PSocketClientImpl* client) {
DCHECK(message_loop_->BelongsToCurrentThread());
return clients_.Add(client);
}
@@ -139,7 +139,7 @@ void P2PSocketDispatcher::OnGetHostAddressResult(
void P2PSocketDispatcher::OnSocketCreated(
int socket_id, const net::IPEndPoint& address) {
- P2PSocketClient* client = GetClient(socket_id);
+ P2PSocketClientImpl* client = GetClient(socket_id);
if (client) {
client->OnSocketCreated(address);
}
@@ -147,21 +147,21 @@ void P2PSocketDispatcher::OnSocketCreated(
void P2PSocketDispatcher::OnIncomingTcpConnection(
int socket_id, const net::IPEndPoint& address) {
- P2PSocketClient* client = GetClient(socket_id);
+ P2PSocketClientImpl* client = GetClient(socket_id);
if (client) {
client->OnIncomingTcpConnection(address);
}
}
void P2PSocketDispatcher::OnSendComplete(int socket_id) {
- P2PSocketClient* client = GetClient(socket_id);
+ P2PSocketClientImpl* client = GetClient(socket_id);
if (client) {
client->OnSendComplete();
}
}
void P2PSocketDispatcher::OnError(int socket_id) {
- P2PSocketClient* client = GetClient(socket_id);
+ P2PSocketClientImpl* client = GetClient(socket_id);
if (client) {
client->OnError();
}
@@ -170,14 +170,14 @@ void P2PSocketDispatcher::OnError(int socket_id) {
void P2PSocketDispatcher::OnDataReceived(
int socket_id, const net::IPEndPoint& address,
const std::vector<char>& data) {
- P2PSocketClient* client = GetClient(socket_id);
+ P2PSocketClientImpl* client = GetClient(socket_id);
if (client) {
client->OnDataReceived(address, data);
}
}
-P2PSocketClient* P2PSocketDispatcher::GetClient(int socket_id) {
- P2PSocketClient* client = clients_.Lookup(socket_id);
+P2PSocketClientImpl* P2PSocketDispatcher::GetClient(int socket_id) {
+ P2PSocketClientImpl* client = clients_.Lookup(socket_id);
if (client == NULL) {
// This may happen if the socket was closed, but the browser side
// hasn't processed the close message by the time it sends the
« content/public/renderer/p2p_socket_client.h ('K') | « content/renderer/p2p/socket_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698