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

Unified Diff: media/blink/cdm_session_adapter.cc

Issue 2663483003: media: Add log in CdmSessionAdapter (Closed)
Patch Set: media: Add log in CdmSessionAdapter Created 3 years, 11 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/base/cdm_key_information.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/cdm_session_adapter.cc
diff --git a/media/blink/cdm_session_adapter.cc b/media/blink/cdm_session_adapter.cc
index 5b98d039a4fdefca7abcc58d504ed78bd58352a5..d52ccadce7f9db57d7d8d0f35801ddefba67d911 100644
--- a/media/blink/cdm_session_adapter.cc
+++ b/media/blink/cdm_session_adapter.cc
@@ -101,6 +101,7 @@ void CdmSessionAdapter::LoadSession(
CdmSessionType session_type,
const std::string& session_id,
std::unique_ptr<NewSessionCdmPromise> promise) {
+ DVLOG(2) << __func__ << ": session_id = " << session_id;
cdm_->LoadSession(session_type, session_id, std::move(promise));
}
@@ -108,18 +109,21 @@ void CdmSessionAdapter::UpdateSession(
const std::string& session_id,
const std::vector<uint8_t>& response,
std::unique_ptr<SimpleCdmPromise> promise) {
+ DVLOG(3) << __func__ << ": session_id = " << session_id;
cdm_->UpdateSession(session_id, response, std::move(promise));
}
void CdmSessionAdapter::CloseSession(
const std::string& session_id,
std::unique_ptr<SimpleCdmPromise> promise) {
+ DVLOG(2) << __func__ << ": session_id = " << session_id;
cdm_->CloseSession(session_id, std::move(promise));
}
void CdmSessionAdapter::RemoveSession(
const std::string& session_id,
std::unique_ptr<SimpleCdmPromise> promise) {
+ DVLOG(2) << __func__ << ": session_id = " << session_id;
cdm_->RemoveSession(session_id, std::move(promise));
}
@@ -141,7 +145,7 @@ void CdmSessionAdapter::OnCdmCreated(
base::TimeTicks start_time,
const scoped_refptr<ContentDecryptionModule>& cdm,
const std::string& error_message) {
- DVLOG(2) << __func__ << ": "
+ DVLOG(1) << __func__ << ": "
<< (cdm ? "success" : "failure (" + error_message + ")");
DCHECK(!cdm_);
@@ -178,8 +182,10 @@ void CdmSessionAdapter::OnSessionMessage(
WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
DLOG_IF(WARNING, !session) << __func__ << " for unknown session "
<< session_id;
- if (session)
+ if (session) {
+ DVLOG(3) << __func__ << ": session_id = " << session_id;
session->OnSessionMessage(message_type, message);
+ }
}
void CdmSessionAdapter::OnSessionKeysChange(const std::string& session_id,
@@ -188,9 +194,15 @@ void CdmSessionAdapter::OnSessionKeysChange(const std::string& session_id,
WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
DLOG_IF(WARNING, !session) << __func__ << " for unknown session "
<< session_id;
- if (session)
+ if (session) {
+ DVLOG(2) << __func__ << ": session_id = " << session_id;
+ DVLOG(2) << " - has_additional_usable_key = " << has_additional_usable_key;
+ for (const CdmKeyInformation* info : keys_info)
+ DVLOG(2) << " - " << *info;
+
session->OnSessionKeysChange(has_additional_usable_key,
std::move(keys_info));
+ }
}
void CdmSessionAdapter::OnSessionExpirationUpdate(const std::string& session_id,
@@ -198,16 +210,25 @@ void CdmSessionAdapter::OnSessionExpirationUpdate(const std::string& session_id,
WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
DLOG_IF(WARNING, !session) << __func__ << " for unknown session "
<< session_id;
- if (session)
+ if (session) {
+ DVLOG(2) << __func__ << ": session_id = " << session_id;
+ if (new_expiry_time.is_null())
+ DVLOG(2) << " - new_expiry_time = NaN";
+ else
+ DVLOG(2) << " - new_expiry_time = " << new_expiry_time;
+
session->OnSessionExpirationUpdate(new_expiry_time);
+ }
}
void CdmSessionAdapter::OnSessionClosed(const std::string& session_id) {
WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
DLOG_IF(WARNING, !session) << __func__ << " for unknown session "
<< session_id;
- if (session)
+ if (session) {
+ DVLOG(2) << __func__ << ": session_id = " << session_id;
session->OnSessionClosed();
+ }
}
WebContentDecryptionModuleSessionImpl* CdmSessionAdapter::GetSession(
« no previous file with comments | « media/base/cdm_key_information.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698