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

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

Issue 2841803003: Wire up rtc_packet_ids to P2PSocketHostTcp, which is required for correct BWE in WebRTC. (Closed)
Patch Set: Created 3 years, 8 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_host_tcp.h
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.h b/content/browser/renderer_host/p2p/socket_host_tcp.h
index a7771c9871ef07d7353a152f915358df24f3bad9..998f83f800fdd9a8059decb6ac7be808c4e6a36e 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.h
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.h
@@ -30,6 +30,8 @@ namespace content {
class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost {
public:
Taylor_Brandstetter 2017/04/25 21:34:19 Could add a comment that the uint64_t is the packe
Stefan 2017/04/26 09:02:39 More self explanatory now that I've made this a st
+ typedef std::pair<uint64_t, scoped_refptr<net::DrainableIOBuffer>> SendBuffer;
Sergey Ulanov 2017/04/26 00:11:52 I think it would be better to replace this with a
Stefan 2017/04/26 09:02:39 Done.
+
P2PSocketHostTcpBase(IPC::Sender* message_sender,
int socket_id,
P2PSocketType type,
@@ -60,7 +62,7 @@ class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost {
const std::vector<char>& data,
const rtc::PacketOptions& options) = 0;
- void WriteOrQueue(scoped_refptr<net::DrainableIOBuffer>& buffer);
+ void WriteOrQueue(SendBuffer& buffer);
void OnPacket(const std::vector<char>& data);
void OnError();
@@ -91,8 +93,8 @@ class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost {
std::unique_ptr<net::StreamSocket> socket_;
scoped_refptr<net::GrowableIOBuffer> read_buffer_;
- std::queue<scoped_refptr<net::DrainableIOBuffer> > write_queue_;
- scoped_refptr<net::DrainableIOBuffer> write_buffer_;
+ std::queue<SendBuffer> write_queue_;
+ SendBuffer write_buffer_;
bool write_pending_;

Powered by Google App Engine
This is Rietveld 408576698