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

Unified Diff: media/mojo/services/mojo_cdm.cc

Issue 813683005: Add |legacy_destination_url| back to SessionMessage for EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes Created 5 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/mojo/services/mojo_cdm.h ('k') | media/mojo/services/mojo_cdm_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_cdm.cc
diff --git a/media/mojo/services/mojo_cdm.cc b/media/mojo/services/mojo_cdm.cc
index efe7bacffc4fea6e1a42f06b51ce963c3810b5c6..69d2046e2a27edcb171e702dd1e06224f352e6c2 100644
--- a/media/mojo/services/mojo_cdm.cc
+++ b/media/mojo/services/mojo_cdm.cc
@@ -122,10 +122,18 @@ CdmContext* MojoCdm::GetCdmContext() {
void MojoCdm::OnSessionMessage(const mojo::String& session_id,
mojo::CdmMessageType message_type,
- mojo::Array<uint8_t> message) {
+ mojo::Array<uint8_t> message,
+ const mojo::String& legacy_destination_url) {
+ GURL verified_gurl = GURL(legacy_destination_url);
+ if (!verified_gurl.is_valid() && !verified_gurl.is_empty()) {
+ DLOG(WARNING) << "SessionMessage destination_url is invalid : "
+ << verified_gurl.possibly_invalid_spec();
+ verified_gurl = GURL::EmptyGURL(); // Replace invalid destination_url.
+ }
+
session_message_cb_.Run(session_id,
static_cast<MediaKeys::MessageType>(message_type),
- message.storage());
+ message.storage(), verified_gurl);
}
void MojoCdm::OnSessionClosed(const mojo::String& session_id) {
« no previous file with comments | « media/mojo/services/mojo_cdm.h ('k') | media/mojo/services/mojo_cdm_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698