diff options
author | jrummell <jrummell@chromium.org> | 2015-04-24 10:15:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-24 17:15:51 +0000 |
commit | f52b16ac4740888ce847620da41357824286a719 (patch) | |
tree | ee6d9cb1cc6a0d6f4dc0cffbb0e0004bcda1b54e /media/cdm/ppapi/external_clear_key/clear_key_cdm.cc | |
parent | 04ffcf25e708f3835ad4a48af044b2fb10aa6c27 (diff) | |
download | chromium_src-f52b16ac4740888ce847620da41357824286a719.zip chromium_src-f52b16ac4740888ce847620da41357824286a719.tar.gz chromium_src-f52b16ac4740888ce847620da41357824286a719.tar.bz2 |
Use std::vector<uint8_t> instead of uint8*/int for MediaKeys interface
BUG=433446
TEST=media_unittests and EME layout tests pass
Review URL: https://codereview.chromium.org/1072403009
Cr-Commit-Position: refs/heads/master@{#326824}
Diffstat (limited to 'media/cdm/ppapi/external_clear_key/clear_key_cdm.cc')
-rw-r--r-- | media/cdm/ppapi/external_clear_key/clear_key_cdm.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc index 725ee88..39199de 100644 --- a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc +++ b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc @@ -322,7 +322,8 @@ void ClearKeyCdm::CreateSessionAndGenerateRequest( promise_id))); decryptor_.CreateSessionAndGenerateRequest( ConvertSessionType(session_type), ConvertInitDataType(init_data_type), - init_data, init_data_size, promise.Pass()); + std::vector<uint8_t>(init_data, init_data + init_data_size), + promise.Pass()); if (key_system_ == kExternalClearKeyFileIOTestKeySystem) StartFileIOTest(); @@ -361,9 +362,9 @@ void ClearKeyCdm::LoadSession(uint32 promise_id, base::Bind(&ClearKeyCdm::OnPromiseFailed, base::Unretained(this), promise_id))); - decryptor_.CreateSessionAndGenerateRequest(MediaKeys::TEMPORARY_SESSION, - EmeInitDataType::WEBM, NULL, 0, - promise.Pass()); + decryptor_.CreateSessionAndGenerateRequest( + MediaKeys::TEMPORARY_SESSION, EmeInitDataType::WEBM, + std::vector<uint8_t>(), promise.Pass()); } void ClearKeyCdm::UpdateSession(uint32 promise_id, @@ -384,7 +385,8 @@ void ClearKeyCdm::UpdateSession(uint32 promise_id, base::Bind(&ClearKeyCdm::OnPromiseFailed, base::Unretained(this), promise_id))); decryptor_.UpdateSession( - web_session_str, response, response_size, promise.Pass()); + web_session_str, std::vector<uint8_t>(response, response + response_size), + promise.Pass()); if (!renewal_timer_set_) { ScheduleNextRenewal(); @@ -721,8 +723,7 @@ void ClearKeyCdm::LoadLoadableSession() { base::Bind(&ClearKeyCdm::OnPromiseFailed, base::Unretained(this), promise_id_for_emulated_loadsession_))); decryptor_.UpdateSession(session_id_for_emulated_loadsession_, - reinterpret_cast<const uint8*>(jwk_set.data()), - jwk_set.size(), + std::vector<uint8_t>(jwk_set.begin(), jwk_set.end()), promise.Pass()); } |