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

Unified Diff: webrtc/api/datachannel.cc

Issue 1930463002: Replace scoped_ptr with unique_ptr in webrtc/api/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 | « webrtc/api/androidvideocapturer.cc ('k') | webrtc/api/datachannel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/datachannel.cc
diff --git a/webrtc/api/datachannel.cc b/webrtc/api/datachannel.cc
index 612d7e0b38256b27a00c0716645d825c1259e365..452e4b39611f7f0d99d6e0813f39124eeaf5aaf5 100644
--- a/webrtc/api/datachannel.cc
+++ b/webrtc/api/datachannel.cc
@@ -10,6 +10,7 @@
#include "webrtc/api/datachannel.h"
+#include <memory>
#include <string>
#include "webrtc/api/mediastreamprovider.h"
@@ -363,7 +364,7 @@ void DataChannel::OnDataReceived(cricket::DataChannel* channel,
}
bool binary = (params.type == cricket::DMT_BINARY);
- rtc::scoped_ptr<DataBuffer> buffer(new DataBuffer(payload, binary));
+ std::unique_ptr<DataBuffer> buffer(new DataBuffer(payload, binary));
if (state_ == kOpen && observer_) {
observer_->OnMessage(*buffer.get());
} else {
@@ -494,7 +495,7 @@ void DataChannel::DeliverQueuedReceivedData() {
}
while (!queued_received_data_.Empty()) {
- rtc::scoped_ptr<DataBuffer> buffer(queued_received_data_.Front());
+ std::unique_ptr<DataBuffer> buffer(queued_received_data_.Front());
observer_->OnMessage(*buffer);
queued_received_data_.Pop();
}
@@ -589,7 +590,7 @@ void DataChannel::SendQueuedControlMessages() {
control_packets.Swap(&queued_control_data_);
while (!control_packets.Empty()) {
- rtc::scoped_ptr<DataBuffer> buf(control_packets.Front());
+ std::unique_ptr<DataBuffer> buf(control_packets.Front());
SendControlMessage(buf->data);
control_packets.Pop();
}
« no previous file with comments | « webrtc/api/androidvideocapturer.cc ('k') | webrtc/api/datachannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698