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

Side by Side Diff: media/cdm/default_cdm_factory.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 unified diff | Download patch
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | media/cdm/ppapi/external_clear_key/clear_key_cdm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cdm/default_cdm_factory.h" 5 #include "media/cdm/default_cdm_factory.h"
6 6
7 #include "media/base/key_systems.h" 7 #include "media/base/key_systems.h"
8 #include "media/cdm/aes_decryptor.h" 8 #include "media/cdm/aes_decryptor.h"
9 #include "url/gurl.h"
9 10
10 namespace media { 11 namespace media {
11 12
12 DefaultCdmFactory::DefaultCdmFactory() { 13 DefaultCdmFactory::DefaultCdmFactory() {
13 } 14 }
14 15
15 DefaultCdmFactory::~DefaultCdmFactory() { 16 DefaultCdmFactory::~DefaultCdmFactory() {
16 } 17 }
17 18
18 scoped_ptr<MediaKeys> DefaultCdmFactory::Create( 19 scoped_ptr<MediaKeys> DefaultCdmFactory::Create(
19 const std::string& key_system, 20 const std::string& key_system,
20 bool allow_distinctive_identifier, 21 bool allow_distinctive_identifier,
21 bool allow_persistent_state, 22 bool allow_persistent_state,
22 const GURL& security_origin, 23 const GURL& security_origin,
23 const SessionMessageCB& session_message_cb, 24 const SessionMessageCB& session_message_cb,
24 const SessionClosedCB& session_closed_cb, 25 const SessionClosedCB& session_closed_cb,
25 const LegacySessionErrorCB& legacy_session_error_cb, 26 const LegacySessionErrorCB& legacy_session_error_cb,
26 const SessionKeysChangeCB& session_keys_change_cb, 27 const SessionKeysChangeCB& session_keys_change_cb,
27 const SessionExpirationUpdateCB& session_expiration_update_cb) { 28 const SessionExpirationUpdateCB& session_expiration_update_cb) {
29 if (!security_origin.is_valid())
30 return nullptr;
31
28 if (CanUseAesDecryptor(key_system)) { 32 if (CanUseAesDecryptor(key_system)) {
29 return make_scoped_ptr(new AesDecryptor( 33 return make_scoped_ptr(new AesDecryptor(security_origin, session_message_cb,
30 session_message_cb, session_closed_cb, session_keys_change_cb)); 34 session_closed_cb,
35 session_keys_change_cb));
31 } 36 }
32 37
33 return nullptr; 38 return nullptr;
34 } 39 }
35 40
36 } // namespace media 41 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | media/cdm/ppapi/external_clear_key/clear_key_cdm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698