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

Unified Diff: media/mojo/common/media_type_converters.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/midi/usb_midi_device_factory_android.cc ('k') | media/mojo/common/media_type_converters_unittest.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.cc
diff --git a/media/mojo/common/media_type_converters.cc b/media/mojo/common/media_type_converters.cc
index 908f012a28c19e48148a57d522a592ce62f6f99b..71bea8d4b769f9aa857d82752194bbf2c8d0b8fd 100644
--- a/media/mojo/common/media_type_converters.cc
+++ b/media/mojo/common/media_type_converters.cc
@@ -417,9 +417,9 @@ std::unique_ptr<media::DecryptConfig>
TypeConverter<std::unique_ptr<media::DecryptConfig>,
media::mojom::DecryptConfigPtr>::
Convert(const media::mojom::DecryptConfigPtr& input) {
- return base::WrapUnique(new media::DecryptConfig(
+ return base::MakeUnique<media::DecryptConfig>(
input->key_id, input->iv,
- input->subsamples.To<std::vector<media::SubsampleEntry>>()));
+ input->subsamples.To<std::vector<media::SubsampleEntry>>());
}
// static
@@ -590,10 +590,10 @@ std::unique_ptr<media::CdmKeyInformation>
TypeConverter<std::unique_ptr<media::CdmKeyInformation>,
media::mojom::CdmKeyInformationPtr>::
Convert(const media::mojom::CdmKeyInformationPtr& input) {
- return base::WrapUnique(new media::CdmKeyInformation(
+ return base::MakeUnique<media::CdmKeyInformation>(
input->key_id.storage(),
static_cast<media::CdmKeyInformation::KeyStatus>(input->status),
- input->system_code));
+ input->system_code);
}
// static
« no previous file with comments | « media/midi/usb_midi_device_factory_android.cc ('k') | media/mojo/common/media_type_converters_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698