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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc

Issue 1923133002: Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Don't remove #include "scoped_ptr.h" from .h files 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
Index: webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc
index cbded6872d389330f958c82716ba8ddc679df721..5bbe97a32ce300d6d3118524fff0fd252faa2909 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc
@@ -8,11 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <memory>
+
#include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/source/byte_io.h"
#include "webrtc/modules/rtp_rtcp/source/mock/mock_rtp_payload_strategy.h"
@@ -58,7 +59,7 @@ class RtpPayloadRegistryTest : public ::testing::Test {
return returned_payload_on_heap;
}
- rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
+ std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_;
testing::NiceMock<MockRTPPayloadStrategy>* mock_payload_strategy_;
};
@@ -296,9 +297,9 @@ void TestRtxPacket(RTPPayloadRegistry* rtp_payload_registry,
uint16_t original_sequence_number = 1234;
uint32_t original_ssrc = 500;
- rtc::scoped_ptr<const uint8_t[]> packet(GenerateRtxPacket(
+ std::unique_ptr<const uint8_t[]> packet(GenerateRtxPacket(
header_length, payload_length, original_sequence_number));
- rtc::scoped_ptr<uint8_t[]> restored_packet(
+ std::unique_ptr<uint8_t[]> restored_packet(
new uint8_t[header_length + payload_length]);
size_t length = original_length;
bool success = rtp_payload_registry->RestoreOriginalPacket(
@@ -312,7 +313,7 @@ void TestRtxPacket(RTPPayloadRegistry* rtp_payload_registry,
EXPECT_EQ(original_length - kRtxHeaderSize, length)
<< "The restored packet should be exactly kRtxHeaderSize smaller.";
- rtc::scoped_ptr<RtpHeaderParser> header_parser(RtpHeaderParser::Create());
+ std::unique_ptr<RtpHeaderParser> header_parser(RtpHeaderParser::Create());
RTPHeader restored_header;
ASSERT_TRUE(
header_parser->Parse(restored_packet.get(), length, &restored_header));
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698