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

Side by Side Diff: content/renderer/p2p/socket_dispatcher.h

Issue 759923003: Detect situation when there is no missing send completion signal in P2PSocket implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // P2PSocketDispatcher is a per-renderer object that dispatchers all 5 // P2PSocketDispatcher is a per-renderer object that dispatchers all
6 // P2P messages received from the browser and relays all P2P messages 6 // P2P messages received from the browser and relays all P2P messages
7 // sent to the browser. P2PSocketClient instances register themselves 7 // sent to the browser. P2PSocketClient instances register themselves
8 // with the dispatcher using RegisterClient() and UnregisterClient(). 8 // with the dispatcher using RegisterClient() and UnregisterClient().
9 // 9 //
10 // Relationship of classes. 10 // Relationship of classes.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void UnregisterHostAddressRequest(int id); 89 void UnregisterHostAddressRequest(int id);
90 90
91 // Incoming message handlers. 91 // Incoming message handlers.
92 void OnNetworkListChanged(const net::NetworkInterfaceList& networks); 92 void OnNetworkListChanged(const net::NetworkInterfaceList& networks);
93 void OnGetHostAddressResult(int32 request_id, 93 void OnGetHostAddressResult(int32 request_id,
94 const net::IPAddressList& addresses); 94 const net::IPAddressList& addresses);
95 void OnSocketCreated(int socket_id, 95 void OnSocketCreated(int socket_id,
96 const net::IPEndPoint& local_address, 96 const net::IPEndPoint& local_address,
97 const net::IPEndPoint& remote_address); 97 const net::IPEndPoint& remote_address);
98 void OnIncomingTcpConnection(int socket_id, const net::IPEndPoint& address); 98 void OnIncomingTcpConnection(int socket_id, const net::IPEndPoint& address);
99 void OnSendComplete(int socket_id); 99 void OnSendComplete(int socket_id, const P2PSendPacketMetrics& send_metrics);
100 void OnError(int socket_id); 100 void OnError(int socket_id);
101 void OnDataReceived(int socket_id, const net::IPEndPoint& address, 101 void OnDataReceived(int socket_id, const net::IPEndPoint& address,
102 const std::vector<char>& data, 102 const std::vector<char>& data,
103 const base::TimeTicks& timestamp); 103 const base::TimeTicks& timestamp);
104 104
105 P2PSocketClientImpl* GetClient(int socket_id); 105 P2PSocketClientImpl* GetClient(int socket_id);
106 106
107 scoped_refptr<base::MessageLoopProxy> message_loop_; 107 scoped_refptr<base::MessageLoopProxy> message_loop_;
108 IDMap<P2PSocketClientImpl> clients_; 108 IDMap<P2PSocketClientImpl> clients_;
109 109
110 IDMap<P2PAsyncAddressResolver> host_address_requests_; 110 IDMap<P2PAsyncAddressResolver> host_address_requests_;
111 111
112 bool network_notifications_started_; 112 bool network_notifications_started_;
113 scoped_refptr<ObserverListThreadSafe<NetworkListObserver> > 113 scoped_refptr<ObserverListThreadSafe<NetworkListObserver> >
114 network_list_observers_; 114 network_list_observers_;
115 115
116 IPC::Sender* sender_; 116 IPC::Sender* sender_;
117 117
118 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcher); 118 DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcher);
119 }; 119 };
120 120
121 } // namespace content 121 } // namespace content
122 122
123 #endif // CONTENT_RENDERER_P2P_SOCKET_DISPATCHER_H_ 123 #endif // CONTENT_RENDERER_P2P_SOCKET_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698