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

Unified Diff: webrtc/p2p/base/port.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/base/port.h ('k') | webrtc/p2p/base/port_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/port.cc
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc
index 0238aa2ba207ac7b4478f2ad40797d562c1bcea4..2ee012aca0b7fee9353acbc293787146aad03e8f 100644
--- a/webrtc/p2p/base/port.cc
+++ b/webrtc/p2p/base/port.cc
@@ -21,7 +21,6 @@
#include "webrtc/base/logging.h"
#include "webrtc/base/messagedigest.h"
#include "webrtc/base/network.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/stringencode.h"
#include "webrtc/base/stringutils.h"
@@ -278,7 +277,7 @@ void Port::OnReadPacket(
// If this is an authenticated STUN request, then signal unknown address and
// send back a proper binding response.
- rtc::scoped_ptr<IceMessage> msg;
+ std::unique_ptr<IceMessage> msg;
std::string remote_username;
if (!GetStunMessage(data, size, addr, &msg, &remote_username)) {
LOG_J(LS_ERROR, this) << "Received non-STUN packet from unknown address ("
@@ -325,7 +324,7 @@ size_t Port::AddPrflxCandidate(const Candidate& local) {
bool Port::GetStunMessage(const char* data,
size_t size,
const rtc::SocketAddress& addr,
- rtc::scoped_ptr<IceMessage>* out_msg,
+ std::unique_ptr<IceMessage>* out_msg,
std::string* out_username) {
// NOTE: This could clearly be optimized to avoid allocating any memory.
// However, at the data rates we'll be looking at on the client side,
@@ -342,7 +341,7 @@ bool Port::GetStunMessage(const char* data,
// Parse the request message. If the packet is not a complete and correct
// STUN message, then ignore it.
- rtc::scoped_ptr<IceMessage> stun_msg(new IceMessage());
+ std::unique_ptr<IceMessage> stun_msg(new IceMessage());
rtc::ByteBufferReader buf(data, size);
if (!stun_msg->Read(&buf) || (buf.Length() > 0)) {
return false;
@@ -895,7 +894,7 @@ void Connection::OnSendStunPacket(const void* data, size_t size,
void Connection::OnReadPacket(
const char* data, size_t size, const rtc::PacketTime& packet_time) {
- rtc::scoped_ptr<IceMessage> msg;
+ std::unique_ptr<IceMessage> msg;
std::string remote_ufrag;
const rtc::SocketAddress& addr(remote_candidate_.address());
if (!port_->GetStunMessage(data, size, addr, &msg, &remote_ufrag)) {
« no previous file with comments | « webrtc/p2p/base/port.h ('k') | webrtc/p2p/base/port_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698