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

Unified Diff: content/renderer/pepper/content_decryptor_delegate.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
Index: content/renderer/pepper/content_decryptor_delegate.cc
diff --git a/content/renderer/pepper/content_decryptor_delegate.cc b/content/renderer/pepper/content_decryptor_delegate.cc
index b085c8a9213496f51c8b4f3733573e70df333a47..48a843de42119fcf1f3a4b756072dfeb76c90024 100644
--- a/content/renderer/pepper/content_decryptor_delegate.cc
+++ b/content/renderer/pepper/content_decryptor_delegate.cc
@@ -767,7 +767,8 @@ void ContentDecryptorDelegate::OnPromiseRejected(
void ContentDecryptorDelegate::OnSessionMessage(PP_Var web_session_id,
PP_CdmMessageType message_type,
- PP_Var message) {
+ PP_Var message,
+ PP_Var legacy_destination_url) {
if (session_message_cb_.is_null())
return;
@@ -781,9 +782,23 @@ void ContentDecryptorDelegate::OnSessionMessage(PP_Var web_session_id,
message_vector.assign(data, data + message_array_buffer->ByteLength());
}
+ StringVar* destination_url_string =
+ StringVar::FromPPVar(legacy_destination_url);
+ if (!destination_url_string) {
+ NOTREACHED();
+ return;
+ }
+
+ GURL verified_gurl = GURL(destination_url_string->value());
+ if (!verified_gurl.is_valid()) {
+ DLOG(WARNING) << "SessionMessage legacy_destination_url is invalid : "
+ << verified_gurl.possibly_invalid_spec();
+ verified_gurl = GURL::EmptyGURL(); // Replace invalid destination_url.
+ }
+
session_message_cb_.Run(web_session_id_string->value(),
PpCdmMessageTypeToMediaMessageType(message_type),
- message_vector);
+ message_vector, verified_gurl);
}
void ContentDecryptorDelegate::OnSessionKeysChange(
« no previous file with comments | « content/renderer/pepper/content_decryptor_delegate.h ('k') | content/renderer/pepper/pepper_plugin_instance_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698