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

Unified Diff: content/browser/renderer_host/p2p/socket_dispatcher_host.h

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: Removed unnecessary destruction callback. Removed remaining routing_id. 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_dispatcher_host.h
diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.h b/content/browser/renderer_host/p2p/socket_dispatcher_host.h
index f44bfd56791c8e9525c56f5fc32af3018567a127..b68e4517f52d4589a129c563455192d395085dfe 100644
--- a/content/browser/renderer_host/p2p/socket_dispatcher_host.h
+++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.h
@@ -40,34 +40,31 @@ class P2PSocketDispatcherHost
friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>;
friend class base::DeleteHelper<P2PSocketDispatcherHost>;
- typedef std::pair<int32, int> ExtendedSocketId;
- typedef std::map<ExtendedSocketId, P2PSocketHost*> SocketsMap;
+ typedef std::pair<int, P2PSocketHost*> SocketPair;
tommi (sloooow) - chröme 2012/09/11 12:09:09 You don't need this typedef actually. See comment
perkj_chrome 2012/09/11 14:27:30 Done.
+ typedef std::map<int, P2PSocketHost*> SocketsMap;
class DnsRequest;
- P2PSocketHost* LookupSocket(int32 routing_id, int socket_id);
+ P2PSocketHost* LookupSocket(int socket_id);
// Handlers for the messages coming from the renderer.
void OnStartNetworkNotifications(const IPC::Message& msg);
void OnStopNetworkNotifications(const IPC::Message& msg);
- void OnGetHostAddress(const IPC::Message& msg,
- const std::string& host_name,
+ void OnGetHostAddress(const std::string& host_name,
int32 request_id);
- void OnCreateSocket(const IPC::Message& msg,
- P2PSocketType type,
+ void OnCreateSocket(P2PSocketType type,
int socket_id,
const net::IPEndPoint& local_address,
const net::IPEndPoint& remote_address);
- void OnAcceptIncomingTcpConnection(const IPC::Message& msg,
- int listen_socket_id,
+ void OnAcceptIncomingTcpConnection(int listen_socket_id,
const net::IPEndPoint& remote_address,
int connected_socket_id);
- void OnSend(const IPC::Message& msg, int socket_id,
+ void OnSend(int socket_id,
const net::IPEndPoint& socket_address,
const std::vector<char>& data);
- void OnDestroySocket(const IPC::Message& msg, int socket_id);
+ void OnDestroySocket(int socket_id);
void DoGetNetworkList();
void SendNetworkList(const net::NetworkInterfaceList& list);
@@ -81,10 +78,6 @@ class P2PSocketDispatcherHost
bool monitoring_networks_;
- // List or routing IDs for the hosts that have subscribed to the
- // network list notifications.
- std::set<int> notifications_routing_ids_;
-
std::set<DnsRequest*> dns_requests_;
DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcherHost);

Powered by Google App Engine
This is Rietveld 408576698