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

Unified Diff: webrtc/api/datachannel.h

Issue 1823503002: Reland Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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: webrtc/api/datachannel.h
diff --git a/webrtc/api/datachannel.h b/webrtc/api/datachannel.h
index 62e3eaf2215218f8ebaf54cbda0f7189e1e68216..b8830be300a68d7e3862d61eeb43374de91e01be 100644
--- a/webrtc/api/datachannel.h
+++ b/webrtc/api/datachannel.h
@@ -31,7 +31,7 @@ class DataChannelProviderInterface {
public:
// Sends the data to the transport.
virtual bool SendData(const cricket::SendDataParams& params,
- const rtc::Buffer& payload,
+ const rtc::CopyOnWriteBuffer& payload,
cricket::SendDataResult* result) = 0;
// Connects to the transport signals.
virtual bool ConnectDataChannel(DataChannel* data_channel) = 0;
@@ -143,7 +143,7 @@ class DataChannel : public DataChannelInterface,
// Sigslots from cricket::DataChannel
void OnDataReceived(cricket::DataChannel* channel,
const cricket::ReceiveDataParams& params,
- const rtc::Buffer& payload);
+ const rtc::CopyOnWriteBuffer& payload);
void OnStreamClosedRemotely(uint32_t sid);
// The remote peer request that this channel should be closed.
@@ -236,8 +236,8 @@ class DataChannel : public DataChannelInterface,
bool QueueSendDataMessage(const DataBuffer& buffer);
void SendQueuedControlMessages();
- void QueueControlMessage(const rtc::Buffer& buffer);
- bool SendControlMessage(const rtc::Buffer& buffer);
+ void QueueControlMessage(const rtc::CopyOnWriteBuffer& buffer);
+ bool SendControlMessage(const rtc::CopyOnWriteBuffer& buffer);
std::string label_;
InternalDataChannelInit config_;

Powered by Google App Engine
This is Rietveld 408576698