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

Unified Diff: webrtc/p2p/stunprober/stunprober.cc

Issue 1923163003: Replace scoped_ptr with unique_ptr in webrtc/p2p/ (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/p2p/stunprober/main.cc ('k') | webrtc/p2p/stunprober/stunprober_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/stunprober/stunprober.cc
diff --git a/webrtc/p2p/stunprober/stunprober.cc b/webrtc/p2p/stunprober/stunprober.cc
index a54a843e4510e0e220ada277af670b0f5c0bca72..41ec6b4c775a39206884106277420aa808ac8625 100644
--- a/webrtc/p2p/stunprober/stunprober.cc
+++ b/webrtc/p2p/stunprober/stunprober.cc
@@ -9,6 +9,7 @@
*/
#include <map>
+#include <memory>
#include <set>
#include <string>
@@ -90,11 +91,11 @@ class StunProber::Requester : public sigslot::has_slots<> {
StunProber* prober_;
// The socket for this session.
- rtc::scoped_ptr<rtc::AsyncPacketSocket> socket_;
+ std::unique_ptr<rtc::AsyncPacketSocket> socket_;
// Temporary SocketAddress and buffer for RecvFrom.
rtc::SocketAddress addr_;
- rtc::scoped_ptr<rtc::ByteBufferWriter> response_packet_;
+ std::unique_ptr<rtc::ByteBufferWriter> response_packet_;
std::vector<Request*> requests_;
std::vector<rtc::SocketAddress> server_ips_;
@@ -141,7 +142,7 @@ void StunProber::Requester::SendStunRequest() {
rtc::CreateRandomString(cricket::kStunTransactionIdLength));
message.SetType(cricket::STUN_BINDING_REQUEST);
- rtc::scoped_ptr<rtc::ByteBufferWriter> request_packet(
+ std::unique_ptr<rtc::ByteBufferWriter> request_packet(
new rtc::ByteBufferWriter(nullptr, kMaxUdpBufferSize));
if (!message.Write(request_packet.get())) {
prober_->ReportOnFinished(WRITE_FAILED);
@@ -345,7 +346,7 @@ void StunProber::OnServerResolved(rtc::AsyncResolverInterface* resolver) {
// Prepare all the sockets beforehand. All of them will bind to "any" address.
while (sockets_.size() < total_socket_required()) {
- rtc::scoped_ptr<rtc::AsyncPacketSocket> socket(
+ std::unique_ptr<rtc::AsyncPacketSocket> socket(
socket_factory_->CreateUdpSocket(rtc::SocketAddress(INADDR_ANY, 0), 0,
0));
if (!socket) {
« no previous file with comments | « webrtc/p2p/stunprober/main.cc ('k') | webrtc/p2p/stunprober/stunprober_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698