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

Unified Diff: media/cdm/proxy_decryptor.cc

Issue 1102363005: Initialize the CDM asynchronously (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + Android compile changes Created 5 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 | « media/cdm/ppapi/cdm_adapter.cc ('k') | ppapi/api/private/ppp_content_decryptor_private.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/proxy_decryptor.cc
diff --git a/media/cdm/proxy_decryptor.cc b/media/cdm/proxy_decryptor.cc
index c30cb837f8be46732740419152cbc15a7e33cd4a..b8ba19c5ebc05994e93e20f2056ed7d9e93ed1e7 100644
--- a/media/cdm/proxy_decryptor.cc
+++ b/media/cdm/proxy_decryptor.cc
@@ -94,15 +94,14 @@ void ProxyDecryptor::OnCdmCreated(const std::string& key_system,
if (!cdm) {
cdm_context_ready_cb.Run(nullptr);
- return;
- }
+ } else {
+ key_system_ = key_system;
+ security_origin_ = security_origin;
+ is_clear_key_ = IsClearKey(key_system) || IsExternalClearKey(key_system);
+ media_keys_ = cdm.Pass();
- key_system_ = key_system;
- security_origin_ = security_origin;
- is_clear_key_ = IsClearKey(key_system) || IsExternalClearKey(key_system);
- media_keys_ = cdm.Pass();
-
- cdm_context_ready_cb.Run(media_keys_->GetCdmContext());
+ cdm_context_ready_cb.Run(media_keys_->GetCdmContext());
+ }
for (const auto& request : pending_requests_)
GenerateKeyRequestInternal(request->init_data_type, request->init_data);
« no previous file with comments | « media/cdm/ppapi/cdm_adapter.cc ('k') | ppapi/api/private/ppp_content_decryptor_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698