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

Unified Diff: media/cdm/ppapi/external_clear_key/clear_key_cdm.cc

Issue 1920433003: EME: Address TODOs related to the removal of prefixed EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update per crbug.com/616166: Remove NOTREACHED and re-enable test. 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/cdm/aes_decryptor_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
diff --git a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
index 7939dc964d06d3e0ccb9d2ac6061568488d884d5..37dceebc359f394446b600691ae4636c30ba98ba 100644
--- a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
+++ b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
@@ -335,9 +335,14 @@ void ClearKeyCdm::LoadSession(uint32_t promise_id,
promise_id),
base::Bind(&ClearKeyCdm::OnPromiseFailed, base::Unretained(this),
promise_id)));
- decryptor_->CreateSessionAndGenerateRequest(
- MediaKeys::TEMPORARY_SESSION, EmeInitDataType::WEBM,
- std::vector<uint8_t>(), std::move(promise));
+ // AesDecryptor does not support loading, so create a temporary session to
+ // represent it in other session-related methods.
+ std::vector<uint8_t> key_id(
+ kLoadableSessionKeyId,
+ kLoadableSessionKeyId + arraysize(kLoadableSessionKeyId) - 1);
+ decryptor_->CreateSessionAndGenerateRequest(MediaKeys::TEMPORARY_SESSION,
+ EmeInitDataType::WEBM, key_id,
+ std::move(promise));
}
void ClearKeyCdm::UpdateSession(uint32_t promise_id,
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698