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

Side by Side Diff: media/cdm/aes_decryptor.cc

Issue 835683002: media: Always define |cdm_id| in CdmContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 years, 9 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.h ('k') | media/test/pipeline_integration_test.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/aes_decryptor.h" 5 #include "media/cdm/aes_decryptor.h"
6 6
7 #include <list> 7 #include <list>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 } 418 }
419 419
420 CdmContext* AesDecryptor::GetCdmContext() { 420 CdmContext* AesDecryptor::GetCdmContext() {
421 return this; 421 return this;
422 } 422 }
423 423
424 Decryptor* AesDecryptor::GetDecryptor() { 424 Decryptor* AesDecryptor::GetDecryptor() {
425 return this; 425 return this;
426 } 426 }
427 427
428 #if defined(ENABLE_BROWSER_CDMS)
429 int AesDecryptor::GetCdmId() const { 428 int AesDecryptor::GetCdmId() const {
430 return kInvalidCdmId; 429 return kInvalidCdmId;
431 } 430 }
432 #endif // defined(ENABLE_BROWSER_CDMS)
433 431
434 void AesDecryptor::RegisterNewKeyCB(StreamType stream_type, 432 void AesDecryptor::RegisterNewKeyCB(StreamType stream_type,
435 const NewKeyCB& new_key_cb) { 433 const NewKeyCB& new_key_cb) {
436 base::AutoLock auto_lock(new_key_cb_lock_); 434 base::AutoLock auto_lock(new_key_cb_lock_);
437 435
438 switch (stream_type) { 436 switch (stream_type) {
439 case kAudio: 437 case kAudio:
440 new_audio_key_cb_ = new_key_cb; 438 new_audio_key_cb_ = new_key_cb;
441 break; 439 break;
442 case kVideo: 440 case kVideo:
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 bool AesDecryptor::DecryptionKey::Init() { 589 bool AesDecryptor::DecryptionKey::Init() {
592 CHECK(!secret_.empty()); 590 CHECK(!secret_.empty());
593 decryption_key_.reset(crypto::SymmetricKey::Import( 591 decryption_key_.reset(crypto::SymmetricKey::Import(
594 crypto::SymmetricKey::AES, secret_)); 592 crypto::SymmetricKey::AES, secret_));
595 if (!decryption_key_) 593 if (!decryption_key_)
596 return false; 594 return false;
597 return true; 595 return true;
598 } 596 }
599 597
600 } // namespace media 598 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/aes_decryptor.h ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698