diff options
| author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
|---|---|---|
| committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
| commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
| tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/media/blink/webcontentdecryptionmodulesession_impl.cc | |
| parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
| download | qtwebengine-chromium-85-based.tar.gz | |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/media/blink/webcontentdecryptionmodulesession_impl.cc')
| -rw-r--r-- | chromium/media/blink/webcontentdecryptionmodulesession_impl.cc | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/chromium/media/blink/webcontentdecryptionmodulesession_impl.cc b/chromium/media/blink/webcontentdecryptionmodulesession_impl.cc index 464b8fa30a6..e7b274b9827 100644 --- a/chromium/media/blink/webcontentdecryptionmodulesession_impl.cc +++ b/chromium/media/blink/webcontentdecryptionmodulesession_impl.cc @@ -226,11 +226,12 @@ class IgnoreResponsePromise : public SimpleCdmPromise { } // namespace WebContentDecryptionModuleSessionImpl::WebContentDecryptionModuleSessionImpl( - const scoped_refptr<CdmSessionAdapter>& adapter) + const scoped_refptr<CdmSessionAdapter>& adapter, + blink::WebEncryptedMediaSessionType session_type) : adapter_(adapter), + session_type_(convertSessionType(session_type)), has_close_been_called_(false), - is_closed_(false), - is_persistent_session_(false) {} + is_closed_(false) {} WebContentDecryptionModuleSessionImpl:: ~WebContentDecryptionModuleSessionImpl() { @@ -269,7 +270,6 @@ void WebContentDecryptionModuleSessionImpl::InitializeNewSession( EmeInitDataType eme_init_data_type, const unsigned char* init_data, size_t init_data_length, - blink::WebEncryptedMediaSessionType session_type, blink::WebContentDecryptionModuleResult result) { DCHECK(init_data); DCHECK(session_id_.empty()); @@ -334,10 +334,8 @@ void WebContentDecryptionModuleSessionImpl::InitializeNewSession( // 10.8 Let cdm be the CDM instance represented by this object's cdm // instance value. // 10.9 Use the cdm to execute the following steps: - CdmSessionType cdm_session_type = convertSessionType(session_type); - is_persistent_session_ = cdm_session_type != CdmSessionType::kTemporary; adapter_->InitializeNewSession( - eme_init_data_type, sanitized_init_data, cdm_session_type, + eme_init_data_type, sanitized_init_data, session_type_, std::unique_ptr<NewSessionCdmPromise>(new NewSessionCdmResultPromise( result, adapter_->GetKeySystemUMAPrefix(), kGenerateRequestUMAName, base::BindOnce( @@ -352,6 +350,8 @@ void WebContentDecryptionModuleSessionImpl::Load( DCHECK(!session_id.IsEmpty()); DCHECK(session_id_.empty()); DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK(session_type_ == CdmSessionType::kPersistentLicense || + session_type_ == CdmSessionType::kPersistentUsageRecord); // From https://w3c.github.io/encrypted-media/#load. // 8.1 Let sanitized session ID be a validated and/or sanitized version of @@ -368,12 +368,8 @@ void WebContentDecryptionModuleSessionImpl::Load( return; } - // TODO(jrummell): Now that there are 2 types of persistent sessions, the - // session type should be passed from blink. Type should also be passed in the - // constructor (and removed from initializeNewSession()). - is_persistent_session_ = true; adapter_->LoadSession( - CdmSessionType::kPersistentLicense, sanitized_session_id, + session_type_, sanitized_session_id, std::unique_ptr<NewSessionCdmPromise>(new NewSessionCdmResultPromise( result, adapter_->GetKeySystemUMAPrefix(), kLoadSessionUMAName, base::BindOnce( |
