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

Unified Diff: media/cdm/ppapi/clear_key_cdm.h

Issue 93243003: Add CDM FileIO tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed; adds more tests; fixes impl Created 7 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
Index: media/cdm/ppapi/clear_key_cdm.h
diff --git a/media/cdm/ppapi/clear_key_cdm.h b/media/cdm/ppapi/clear_key_cdm.h
index 0ec18a101a02303b230dc5ad58f8b571f1d69805..b9ed4bb906cad04070b79a82b5cf17e2eb437a01 100644
--- a/media/cdm/ppapi/clear_key_cdm.h
+++ b/media/cdm/ppapi/clear_key_cdm.h
@@ -23,6 +23,7 @@
#endif
namespace media {
+class FileIOTestRunner;
class CdmVideoDecoder;
class DecoderBuffer;
class FFmpegCdmAudioDecoder;
@@ -30,7 +31,7 @@ class FFmpegCdmAudioDecoder;
// Clear key implementation of the cdm::ContentDecryptionModule interface.
class ClearKeyCdm : public ClearKeyCdmInterface {
public:
- explicit ClearKeyCdm(Host* host, bool is_decrypt_only);
+ explicit ClearKeyCdm(Host* host, bool is_decrypt_only, bool test_file_io);
virtual ~ClearKeyCdm();
// ContentDecryptionModule implementation.
@@ -143,6 +144,11 @@ class ClearKeyCdm : public ClearKeyCdmInterface {
cdm::AudioFrames* audio_frames);
#endif // CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER
+ void StartFileIOTest();
+
+ // Callback for CDM File IO test.
+ void OnFileIOTestComplete(bool success);
+
Client client_;
AesDecryptor decryptor_;
@@ -153,8 +159,10 @@ class ClearKeyCdm : public ClearKeyCdmInterface {
ClearKeyCdmHost* host_;
const bool is_decrypt_only_;
+ const bool test_file_io_;
ddorwin 2013/12/14 20:44:04 should_ ? is_file_io_test_?
xhwang 2013/12/16 23:04:29 Done.
+
+ std::string last_session_id_;
- std::string heartbeat_session_id_;
std::string next_heartbeat_message_;
// Timer delay in milliseconds for the next host_->SetTimer() call.
@@ -178,6 +186,8 @@ class ClearKeyCdm : public ClearKeyCdmInterface {
scoped_ptr<CdmVideoDecoder> video_decoder_;
+ scoped_ptr<FileIOTestRunner> cdm_file_io_test_;
ddorwin 2013/12/14 20:44:04 rename?
xhwang 2013/12/16 23:04:29 Done.
+
DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm);
};

Powered by Google App Engine
This is Rietveld 408576698