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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc

Issue 1924443002: Revert of Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (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
Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
index 203d70fab153a8342b043c7b8109324ceae8f028..3615065351d55206956adb90c0d9d62b6713a9ac 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
@@ -11,7 +11,6 @@
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include <limits>
-#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
@@ -44,7 +43,7 @@
void WithInput(const uint16_t received_seq[],
const int64_t received_ts[],
uint16_t length) {
- std::unique_ptr<int64_t[]> temp_deltas;
+ rtc::scoped_ptr<int64_t[]> temp_deltas;
if (received_ts == nullptr) {
temp_deltas.reset(new int64_t[length]);
GenerateDeltas(received_seq, length, temp_deltas.get());
@@ -137,7 +136,7 @@
std::vector<int64_t> expected_deltas_;
size_t expected_size_;
int64_t default_delta_;
- std::unique_ptr<TransportFeedback> feedback_;
+ rtc::scoped_ptr<TransportFeedback> feedback_;
rtc::Buffer serialized_;
};
@@ -357,7 +356,7 @@
TEST(RtcpPacketTest, TransportFeedback_Limits) {
// Sequence number wrap above 0x8000.
- std::unique_ptr<TransportFeedback> packet(new TransportFeedback());
+ rtc::scoped_ptr<TransportFeedback> packet(new TransportFeedback());
packet->WithBase(0, 0);
EXPECT_TRUE(packet->WithReceivedPacket(0x8000, 1000));
@@ -447,7 +446,7 @@
&mod_buffer[2], ByteReader<uint16_t>::ReadBigEndian(&mod_buffer[2]) +
((kPaddingBytes + 3) / 4));
- std::unique_ptr<TransportFeedback> parsed_packet(
+ rtc::scoped_ptr<TransportFeedback> parsed_packet(
TransportFeedback::ParseFrom(mod_buffer, kExpectedSizeWithPadding));
ASSERT_TRUE(parsed_packet.get() != nullptr);
EXPECT_EQ(kExpectedSizeWords * 4, packet.size()); // Padding not included.
@@ -469,7 +468,7 @@
feedback.WithReceivedPacket(deltas, deltas * 1000 + kLargeTimeDelta);
rtc::Buffer serialized_packet = feedback.Build();
- std::unique_ptr<TransportFeedback> deserialized_packet =
+ rtc::scoped_ptr<TransportFeedback> deserialized_packet =
TransportFeedback::ParseFrom(serialized_packet.data(),
serialized_packet.size());
EXPECT_TRUE(deserialized_packet.get() != nullptr);
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698