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

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

Issue 2057103004: Pass SetServerCertificate call on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | 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 e57bc6f6beac41b1ef812850afc73f622464df57..7939dc964d06d3e0ccb9d2ac6061568488d884d5 100644
--- a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
+++ b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
@@ -420,8 +420,17 @@ void ClearKeyCdm::RemoveSession(uint32_t promise_id,
void ClearKeyCdm::SetServerCertificate(uint32_t promise_id,
const uint8_t* server_certificate_data,
uint32_t server_certificate_data_size) {
- // ClearKey doesn't use a server certificate.
- host_->OnResolvePromise(promise_id);
+ std::unique_ptr<media::SimpleCdmPromise> promise(
+ new media::CdmCallbackPromise<>(
+ base::Bind(&ClearKeyCdm::OnPromiseResolved, base::Unretained(this),
+ promise_id),
+ base::Bind(&ClearKeyCdm::OnPromiseFailed, base::Unretained(this),
+ promise_id)));
+ decryptor_->SetServerCertificate(
+ std::vector<uint8_t>(
+ server_certificate_data,
+ server_certificate_data + server_certificate_data_size),
+ std::move(promise));
}
void ClearKeyCdm::TimerExpired(void* context) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698