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

Unified Diff: media/cdm/ppapi/external_clear_key/clear_key_cdm.cc

Issue 1068823003: Pass security origin to AesDecryptor() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add GN dependency 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/clear_key_cdm.h ('k') | media/mojo/services/mojo_cdm_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
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 255036840bceef7b20353791d20d468c2f00fcb0..725ee88f137d27cf6e741a92e88576e959a8cdd2 100644
--- a/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
+++ b/media/cdm/ppapi/external_clear_key/clear_key_cdm.cc
@@ -23,6 +23,7 @@
#include "media/cdm/json_web_key.h"
#include "media/cdm/ppapi/cdm_file_io_test.h"
#include "media/cdm/ppapi/external_clear_key/cdm_video_decoder.h"
+#include "url/gurl.h"
#if defined(CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER)
#include "base/basictypes.h"
@@ -262,7 +263,8 @@ void* CreateCdmInstance(int cdm_interface_version,
if (!host)
return NULL;
- return new media::ClearKeyCdm(host, key_system_string);
+ // TODO(jrummell): Obtain the proper origin for this instance.
+ return new media::ClearKeyCdm(host, key_system_string, GURL::EmptyGURL());
}
const char* GetCdmVersion() {
@@ -271,8 +273,11 @@ const char* GetCdmVersion() {
namespace media {
-ClearKeyCdm::ClearKeyCdm(ClearKeyCdmHost* host, const std::string& key_system)
+ClearKeyCdm::ClearKeyCdm(ClearKeyCdmHost* host,
+ const std::string& key_system,
+ const GURL& origin)
: decryptor_(
+ origin,
base::Bind(&ClearKeyCdm::OnSessionMessage, base::Unretained(this)),
base::Bind(&ClearKeyCdm::OnSessionClosed, base::Unretained(this)),
base::Bind(&ClearKeyCdm::OnSessionKeysChange,
« no previous file with comments | « media/cdm/ppapi/external_clear_key/clear_key_cdm.h ('k') | media/mojo/services/mojo_cdm_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698