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

Unified Diff: media/mojo/common/media_type_converters_unittest.cc

Issue 2253943004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « media/mojo/common/media_type_converters.cc ('k') | media/mojo/common/mojo_decoder_buffer_converter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/common/media_type_converters_unittest.cc
diff --git a/media/mojo/common/media_type_converters_unittest.cc b/media/mojo/common/media_type_converters_unittest.cc
index 5f52805f7963492c49b87ab83d183ab25a745f6d..082753b58085f4e79071ffa5ed7e29d55a6b39cc 100644
--- a/media/mojo/common/media_type_converters_unittest.cc
+++ b/media/mojo/common/media_type_converters_unittest.cc
@@ -258,7 +258,7 @@ TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_EncryptedBuffer) {
scoped_refptr<DecoderBuffer> buffer(DecoderBuffer::CopyFrom(
reinterpret_cast<const uint8_t*>(&kData), kDataSize));
buffer->set_decrypt_config(
- base::WrapUnique(new DecryptConfig(kKeyId, kIv, subsamples)));
+ base::MakeUnique<DecryptConfig>(kKeyId, kIv, subsamples));
// Convert from and back.
mojom::DecoderBufferPtr ptr(mojom::DecoderBuffer::From(buffer));
@@ -271,8 +271,8 @@ TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_EncryptedBuffer) {
EXPECT_TRUE(buffer->decrypt_config()->Matches(*result->decrypt_config()));
// Test empty IV. This is used for clear buffer in an encrypted stream.
- buffer->set_decrypt_config(base::WrapUnique(
- new DecryptConfig(kKeyId, "", std::vector<SubsampleEntry>())));
+ buffer->set_decrypt_config(base::MakeUnique<DecryptConfig>(
+ kKeyId, "", std::vector<SubsampleEntry>()));
result =
mojom::DecoderBuffer::From(buffer).To<scoped_refptr<DecoderBuffer>>();
EXPECT_TRUE(buffer->decrypt_config()->Matches(*result->decrypt_config()));
« no previous file with comments | « media/mojo/common/media_type_converters.cc ('k') | media/mojo/common/mojo_decoder_buffer_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698