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

Unified Diff: webrtc/api/webrtcsession.cc

Issue 1785713005: Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Feedback from tommi. 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
« no previous file with comments | « webrtc/api/webrtcsession.h ('k') | webrtc/api/webrtcsession_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/webrtcsession.cc
diff --git a/webrtc/api/webrtcsession.cc b/webrtc/api/webrtcsession.cc
index 2f3c911454d440d448f5f4d6c68a498a7ef246fd..025851f2fc2c64bbedbd90cbc23e62152cfe7f75 100644
--- a/webrtc/api/webrtcsession.cc
+++ b/webrtc/api/webrtcsession.cc
@@ -1309,7 +1309,7 @@ sigslot::signal0<>* WebRtcSession::GetOnDestroyedSignal() {
}
bool WebRtcSession::SendData(const cricket::SendDataParams& params,
- const rtc::Buffer& payload,
+ const rtc::CopyOnWriteBuffer& payload,
cricket::SendDataResult* result) {
if (!data_channel_) {
LOG(LS_ERROR) << "SendData called when data_channel_ is NULL.";
@@ -1771,7 +1771,7 @@ void WebRtcSession::OnDtlsSetupFailure(cricket::BaseChannel*, bool rtcp) {
void WebRtcSession::OnDataChannelMessageReceived(
cricket::DataChannel* channel,
const cricket::ReceiveDataParams& params,
- const rtc::Buffer& payload) {
+ const rtc::CopyOnWriteBuffer& payload) {
RTC_DCHECK(data_channel_type_ == cricket::DCT_SCTP);
if (params.type == cricket::DMT_CONTROL && IsOpenMessage(payload)) {
// Received OPEN message; parse and signal that a new data channel should
« no previous file with comments | « webrtc/api/webrtcsession.h ('k') | webrtc/api/webrtcsession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698