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

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

Issue 2846243002: 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
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_host_tcp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9e8fe2d9c8a8693d875fadf4e4b0dde5f8c03699 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.h
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.h
@@ -54,13 +54,23 @@ class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost {
bool SetOption(P2PSocketOption option, int value) override;
protected:
+ struct SendBuffer {
+ SendBuffer();
+ SendBuffer(int32_t packet_id, scoped_refptr<net::DrainableIOBuffer> buffer);
+ SendBuffer(const SendBuffer& rhs);
+ ~SendBuffer();
+
+ int32_t rtc_packet_id;
+ scoped_refptr<net::DrainableIOBuffer> buffer;
+ };
+
// Derived classes will provide the implementation.
virtual int ProcessInput(char* input, int input_len) = 0;
virtual void DoSend(const net::IPEndPoint& to,
const std::vector<char>& data,
const rtc::PacketOptions& options) = 0;
- void WriteOrQueue(scoped_refptr<net::DrainableIOBuffer>& buffer);
+ void WriteOrQueue(SendBuffer& send_buffer);
void OnPacket(const std::vector<char>& data);
void OnError();
@@ -91,8 +101,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_;
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_host_tcp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698