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

Unified Diff: media/cdm/proxy_decryptor.cc

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 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/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.h ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/proxy_decryptor.cc
diff --git a/media/cdm/proxy_decryptor.cc b/media/cdm/proxy_decryptor.cc
index 9260e1455b654fe434eb567f20c7630e21a9ef35..c30cb837f8be46732740419152cbc15a7e33cd4a 100644
--- a/media/cdm/proxy_decryptor.cc
+++ b/media/cdm/proxy_decryptor.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/logging.h"
+#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "media/base/cdm_callback_promise.h"
#include "media/base/cdm_factory.h"
@@ -216,9 +217,8 @@ void ProxyDecryptor::OnPermissionStatus(
// on Android) and the permission status will be evaluated then.
DVLOG_IF(1, !granted) << "Permission request rejected.";
- media_keys_->CreateSessionAndGenerateRequest(
- session_type, init_data_type, vector_as_array(&init_data),
- init_data.size(), promise.Pass());
+ media_keys_->CreateSessionAndGenerateRequest(session_type, init_data_type,
+ init_data, promise.Pass());
}
void ProxyDecryptor::AddKey(const uint8* key,
@@ -271,12 +271,14 @@ void ProxyDecryptor::AddKey(const uint8* key,
GenerateJWKSet(key, key_length, init_data, init_data_length);
DCHECK(!jwk.empty());
media_keys_->UpdateSession(new_session_id,
- reinterpret_cast<const uint8*>(jwk.data()),
- jwk.size(), promise.Pass());
+ std::vector<uint8_t>(jwk.begin(), jwk.end()),
+ promise.Pass());
return;
}
- media_keys_->UpdateSession(new_session_id, key, key_length, promise.Pass());
+ media_keys_->UpdateSession(new_session_id,
+ std::vector<uint8_t>(key, key + key_length),
+ promise.Pass());
}
void ProxyDecryptor::CancelKeyRequest(const std::string& session_id) {
« no previous file with comments | « media/cdm/ppapi/external_clear_key/libvpx_cdm_video_decoder.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698