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

Unified Diff: webrtc/p2p/base/stun.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/relayserver_unittest.cc ('k') | webrtc/p2p/base/stun_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/stun.cc
diff --git a/webrtc/p2p/base/stun.cc b/webrtc/p2p/base/stun.cc
index d0f001485de9d1223fe65328649aa09f8964a95c..ac3fd5f9368bda2e7b2b042be87ee4db5e31b09f 100644
--- a/webrtc/p2p/base/stun.cc
+++ b/webrtc/p2p/base/stun.cc
@@ -12,12 +12,13 @@
#include <string.h>
+#include <memory>
+
#include "webrtc/base/byteorder.h"
#include "webrtc/base/common.h"
#include "webrtc/base/crc32.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/messagedigest.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/stringencode.h"
using rtc::ByteBufferReader;
@@ -173,7 +174,7 @@ bool StunMessage::ValidateMessageIntegrity(const char* data, size_t size,
// Getting length of the message to calculate Message Integrity.
size_t mi_pos = current_pos;
- rtc::scoped_ptr<char[]> temp_data(new char[current_pos]);
+ std::unique_ptr<char[]> temp_data(new char[current_pos]);
memcpy(temp_data.get(), data, current_pos);
if (size > mi_pos + kStunAttributeHeaderSize + kStunMessageIntegritySize) {
// Stun message has other attributes after message integrity.
« no previous file with comments | « webrtc/p2p/base/relayserver_unittest.cc ('k') | webrtc/p2p/base/stun_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698