Index: content/renderer/p2p/socket_client_impl.h |
diff --git a/content/renderer/p2p/socket_client_impl.h b/content/renderer/p2p/socket_client_impl.h |
index 4cda52ddb875d27fbd89ca38535be752e4f86859..3ce7be44dff5c3e38c433590e95c6823b3a1f168 100644 |
--- a/content/renderer/p2p/socket_client_impl.h |
+++ b/content/renderer/p2p/socket_client_impl.h |
@@ -44,10 +44,10 @@ class P2PSocketClientImpl : public P2PSocketClient { |
const std::vector<char>& data) override; |
// Send the |data| to the |address| using Differentiated Services Code Point |
- // |dscp|. |
- void SendWithDscp(const net::IPEndPoint& address, |
- const std::vector<char>& data, |
- const rtc::PacketOptions& options) override; |
+ // |dscp|. Return value is the unique packet_id for this packet. |
+ uint64 SendWithDscp(const net::IPEndPoint& address, |
+ const std::vector<char>& data, |
+ const rtc::PacketOptions& options) override; |
// Setting socket options. |
void SetOption(P2PSocketOption option, int value) override; |
@@ -77,8 +77,7 @@ class P2PSocketClientImpl : public P2PSocketClient { |
void OnSocketCreated(const net::IPEndPoint& local_address, |
const net::IPEndPoint& remote_address); |
void OnIncomingTcpConnection(const net::IPEndPoint& address); |
- void OnSendComplete(int packet_id); |
- void OnSendComplete(); |
+ void OnSendComplete(const P2PSendPacketMetrics& send_metrics); |
void OnError(); |
void OnDataReceived(const net::IPEndPoint& address, |
const std::vector<char>& data, |
@@ -90,12 +89,19 @@ class P2PSocketClientImpl : public P2PSocketClient { |
void DeliverOnIncomingTcpConnection( |
const net::IPEndPoint& address, |
scoped_refptr<P2PSocketClient> new_client); |
- void DeliverOnSendComplete(); |
+ void DeliverOnSendComplete(const P2PSendPacketMetrics& send_metrics); |
void DeliverOnError(); |
void DeliverOnDataReceived(const net::IPEndPoint& address, |
const std::vector<char>& data, |
const base::TimeTicks& timestamp); |
+ // Helper function to be called by SendWithDscp to handle different threading |
+ // condition. |
+ void SendWithDscpAndPacketId(const net::IPEndPoint& address, |
+ const std::vector<char>& data, |
+ const rtc::PacketOptions& options, |
+ uint64 packet_id); |
+ |
// Scheduled on the IPC thread to finish initialization. |
void DoInit(P2PSocketType type, |
const net::IPEndPoint& local_address, |