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

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: fix gyp file Created 7 years 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
« no previous file with comments | « content/renderer/p2p/socket_dispatcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0dc2591f4f6127866e5b601d80c84787c8b9be59 100644
--- a/content/renderer/p2p/socket_dispatcher.cc
+++ b/content/renderer/p2p/socket_dispatcher.cc
@@ -11,7 +11,7 @@
#include "content/common/p2p_messages.h"
#include "content/renderer/p2p/host_address_request.h"
#include "content/renderer/p2p/network_list_observer.h"
-#include "content/renderer/p2p/socket_client.h"
+#include "content/renderer/p2p/socket_client_impl.h"
#include "content/renderer/render_view_impl.h"
namespace content {
@@ -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
« no previous file with comments | « content/renderer/p2p/socket_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698