diff options
author | tomfinegan@chromium.org <tomfinegan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 23:13:27 +0000 |
---|---|---|
committer | tomfinegan@chromium.org <tomfinegan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 23:13:27 +0000 |
commit | 0b95958bb9581ddbd30dcd76e5cfd229f2e82561 (patch) | |
tree | 6781fc84e689c62b3b809753582a798cd218a625 /webkit/media/crypto/ppapi/clear_key_cdm.cc | |
parent | 1f0b68070ca5790535ff55c8c7f0698dd4e4d0ec (diff) | |
download | chromium_src-0b95958bb9581ddbd30dcd76e5cfd229f2e82561.zip chromium_src-0b95958bb9581ddbd30dcd76e5cfd229f2e82561.tar.gz chromium_src-0b95958bb9581ddbd30dcd76e5cfd229f2e82561.tar.bz2 |
Make cdm::Status error names more specific.
Replace kError with kDecryptError, kDecodeError, and kKeyError. Update
usage sites accordingly.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/11021006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159583 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media/crypto/ppapi/clear_key_cdm.cc')
-rw-r--r-- | webkit/media/crypto/ppapi/clear_key_cdm.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.cc b/webkit/media/crypto/ppapi/clear_key_cdm.cc index b04b614..74e117c 100644 --- a/webkit/media/crypto/ppapi/clear_key_cdm.cc +++ b/webkit/media/crypto/ppapi/clear_key_cdm.cc @@ -139,7 +139,7 @@ cdm::Status ClearKeyCdm::GenerateKeyRequest(const uint8_t* init_data, decryptor_.GenerateKeyRequest("", init_data, init_data_size); if (client_.status() != Client::kKeyMessage) - return cdm::kError; + return cdm::kSessionError; DCHECK(key_request); key_request->set_session_id(client_.session_id().data(), @@ -172,7 +172,7 @@ cdm::Status ClearKeyCdm::AddKey(const char* session_id, std::string(session_id, session_id_size)); if (client_.status() != Client::kKeyAdded) - return cdm::kError; + return cdm::kSessionError; return cdm::kSuccess; } @@ -210,7 +210,7 @@ cdm::Status ClearKeyCdm::Decrypt( base::Bind(&CopyDecryptResults, &status, &buffer)); if (status == media::Decryptor::kError) - return cdm::kError; + return cdm::kDecryptError; if (status == media::Decryptor::kNoKey) return cdm::kNoKey; @@ -230,14 +230,16 @@ cdm::Status ClearKeyCdm::Decrypt( cdm::Status ClearKeyCdm::InitializeVideoDecoder( const cdm::VideoDecoderConfig& video_decoder_config) { NOTIMPLEMENTED(); - return cdm::kError; + // TODO(tomfinegan): Determine the proper error to return here once there + // are callers for this method. + return cdm::kSessionError; } cdm::Status ClearKeyCdm::DecryptAndDecodeVideo( const cdm::InputBuffer& encrypted_buffer, cdm::VideoFrame* video_frame) { NOTIMPLEMENTED(); - return cdm::kError; + return cdm::kDecryptError; } void ClearKeyCdm::ResetVideoDecoder() { |