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

Unified Diff: media/cast/sender/external_video_encoder_unittest.cc

Issue 1905763002: Convert //media/cast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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: media/cast/sender/external_video_encoder_unittest.cc
diff --git a/media/cast/sender/external_video_encoder_unittest.cc b/media/cast/sender/external_video_encoder_unittest.cc
index 805eb03d2229ea60f93dfe074518dccb2c5c866b..3a2846f662d615ca72f9d53b931389110d5007d3 100644
--- a/media/cast/sender/external_video_encoder_unittest.cc
+++ b/media/cast/sender/external_video_encoder_unittest.cc
@@ -37,7 +37,7 @@ TEST(QuantizerEstimator, EstimatesForTrivialFrames) {
QuantizerEstimator qe;
const gfx::Size frame_size(320, 180);
- const scoped_ptr<uint8_t[]> black_frame_data(
+ const std::unique_ptr<uint8_t[]> black_frame_data(
new uint8_t[frame_size.GetArea()]);
memset(black_frame_data.get(), 0, frame_size.GetArea());
const scoped_refptr<VideoFrame> black_frame =
@@ -51,7 +51,7 @@ TEST(QuantizerEstimator, EstimatesForTrivialFrames) {
for (int i = 0; i < 3; ++i)
EXPECT_EQ(4.0, qe.EstimateForDeltaFrame(*black_frame));
- const scoped_ptr<uint8_t[]> checkerboard_frame_data(
+ const std::unique_ptr<uint8_t[]> checkerboard_frame_data(
new uint8_t[frame_size.GetArea()]);
for (int i = 0, end = frame_size.GetArea(); i < end; ++i)
checkerboard_frame_data.get()[i] = (((i % 2) == 0) ? 0 : 255);
@@ -68,7 +68,7 @@ TEST(QuantizerEstimator, EstimatesForTrivialFrames) {
// results in high quantizer estimates.
for (int i = 0; i < 3; ++i) {
int rand_seed = 0xdeadbeef + i;
- const scoped_ptr<uint8_t[]> random_frame_data(
+ const std::unique_ptr<uint8_t[]> random_frame_data(
new uint8_t[frame_size.GetArea()]);
for (int j = 0, end = frame_size.GetArea(); j < end; ++j) {
rand_seed = (1103515245 * rand_seed + 12345) % (1 << 31);
« no previous file with comments | « media/cast/sender/external_video_encoder.cc ('k') | media/cast/sender/fake_video_encode_accelerator_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698