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

Unified Diff: media/test/fake_encrypted_media.cc

Issue 2831963003: EME: Allow temporary sessions to be removed for ClearKey only. (Closed)
Patch Set: rebase Created 3 years, 8 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/test/fake_encrypted_media.h ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/fake_encrypted_media.cc
diff --git a/media/test/fake_encrypted_media.cc b/media/test/fake_encrypted_media.cc
index 094ed3820c17d7cfa2c77f5f4ca4c8f9d67be4a6..465f9721bd0a088ffa87a9c7b2d457826105f308 100644
--- a/media/test/fake_encrypted_media.cc
+++ b/media/test/fake_encrypted_media.cc
@@ -22,14 +22,16 @@ int FakeEncryptedMedia::TestCdmContext::GetCdmId() const {
}
FakeEncryptedMedia::FakeEncryptedMedia(AppBase* app)
- : decryptor_(
- new AesDecryptor(GURL::EmptyGURL(),
- base::Bind(&FakeEncryptedMedia::OnSessionMessage,
- base::Unretained(this)),
- base::Bind(&FakeEncryptedMedia::OnSessionClosed,
- base::Unretained(this)),
- base::Bind(&FakeEncryptedMedia::OnSessionKeysChange,
- base::Unretained(this)))),
+ : decryptor_(new AesDecryptor(
+ GURL::EmptyGURL(),
+ base::Bind(&FakeEncryptedMedia::OnSessionMessage,
+ base::Unretained(this)),
+ base::Bind(&FakeEncryptedMedia::OnSessionClosed,
+ base::Unretained(this)),
+ base::Bind(&FakeEncryptedMedia::OnSessionKeysChange,
+ base::Unretained(this)),
+ base::Bind(&FakeEncryptedMedia::OnSessionExpirationUpdate,
+ base::Unretained(this)))),
cdm_context_(decryptor_.get()),
app_(app) {}
@@ -58,6 +60,12 @@ void FakeEncryptedMedia::OnSessionKeysChange(const std::string& session_id,
std::move(keys_info));
}
+void FakeEncryptedMedia::OnSessionExpirationUpdate(
+ const std::string& session_id,
+ base::Time new_expiry_time) {
+ app_->OnSessionExpirationUpdate(session_id, new_expiry_time);
+}
+
void FakeEncryptedMedia::OnEncryptedMediaInitData(
EmeInitDataType init_data_type,
const std::vector<uint8_t>& init_data) {
« no previous file with comments | « media/test/fake_encrypted_media.h ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698