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

Unified Diff: chromecast/media/cdm/cast_cdm.cc

Issue 2895573002: Reland of Remove ScopedVector from all other codes in media/ (Closed)
Patch Set: Fix the compile fails in build target "jpeg_decode_accelerator_unittest" Created 3 years, 7 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 | « no previous file | content/renderer/pepper/content_decryptor_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cdm/cast_cdm.cc
diff --git a/chromecast/media/cdm/cast_cdm.cc b/chromecast/media/cdm/cast_cdm.cc
index e0b02821f0dc143c2302b9b24077f524c5b6206c..53036590bab451759faacf4039e2542e900bcdd7 100644
--- a/chromecast/media/cdm/cast_cdm.cc
+++ b/chromecast/media/cdm/cast_cdm.cc
@@ -127,7 +127,7 @@ void CastCdm::OnSessionKeysChange(const std::string& session_id,
logging::LogMessage log_message(__FILE__, __LINE__, logging::LOG_INFO);
log_message.stream() << "keystatuseschange ";
int status_count[::media::CdmKeyInformation::KEY_STATUS_MAX] = {0};
- for (const auto* key_info : keys_info) {
+ for (const auto& key_info : keys_info) {
status_count[key_info->status]++;
}
for (int i = 0; i != ::media::CdmKeyInformation::KEY_STATUS_MAX; ++i) {
@@ -156,10 +156,8 @@ void CastCdm::KeyIdAndKeyPairsToInfo(const ::media::KeyIdAndKeyPairs& keys,
::media::CdmKeysInfo* keys_info) {
DCHECK(keys_info);
for (const std::pair<std::string, std::string>& key : keys) {
- std::unique_ptr<::media::CdmKeyInformation> cdm_key_information(
- new ::media::CdmKeyInformation(key.first,
- ::media::CdmKeyInformation::USABLE, 0));
- keys_info->push_back(cdm_key_information.release());
+ keys_info->push_back(base::MakeUnique<::media::CdmKeyInformation>(
+ key.first, ::media::CdmKeyInformation::USABLE, 0));
}
}
« no previous file with comments | « no previous file | content/renderer/pepper/content_decryptor_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698