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

Unified Diff: webkit/media/crypto/ppapi/clear_key_cdm.cc

Issue 11469040: EME v0.1: Report defaultURL in KeyMessage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed c&p error and added new check for defaultURL Created 8 years 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 | « content/test/data/media/encrypted_media_utils.js ('k') | webkit/media/webmediaplayer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/crypto/ppapi/clear_key_cdm.cc
diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.cc b/webkit/media/crypto/ppapi/clear_key_cdm.cc
index e6dbd8a972e79409a18bcf14db47e0a5264bde9f..c546c6a13344abbc7fb573af99b0661a37fd6761 100644
--- a/webkit/media/crypto/ppapi/clear_key_cdm.cc
+++ b/webkit/media/crypto/ppapi/clear_key_cdm.cc
@@ -175,6 +175,7 @@ void ClearKeyCdm::Client::KeyMessage(const std::string& key_system,
status_ = kKeyMessage;
session_id_ = session_id;
key_message_ = message;
+ default_url_ = default_url;
}
void ClearKeyCdm::Client::NeedKey(const std::string& key_system,
@@ -265,16 +266,22 @@ cdm::Status ClearKeyCdm::CancelKeyRequest(const char* session_id,
}
void ClearKeyCdm::TimerExpired(void* context) {
- std::string heartbeat_message =
- (!next_heartbeat_message_.empty() &&
- context == &next_heartbeat_message_[0]) ?
- next_heartbeat_message_ :
- "ERROR: Invalid timer context found!";
+ std::string heartbeat_message;
+ if (!next_heartbeat_message_.empty() &&
+ context == &next_heartbeat_message_[0]) {
+ heartbeat_message = next_heartbeat_message_;
+ } else {
+ heartbeat_message = "ERROR: Invalid timer context found!";
+ }
+
+ // This URL is only used for testing the code path for defaultURL.
+ // There is no service at this URL, so applications should ignore it.
+ const char url[] = "http://test.externalclearkey.chromium.org";
host_->SendKeyMessage(
heartbeat_session_id_.data(), heartbeat_session_id_.size(),
heartbeat_message.data(), heartbeat_message.size(),
- NULL, 0);
+ url, arraysize(url) - 1);
ScheduleNextHeartBeat();
}
« no previous file with comments | « content/test/data/media/encrypted_media_utils.js ('k') | webkit/media/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698